fix: video selection gallery scroll (#477)

* fix: video selection gallery scroll

* fix: lint errors
This commit is contained in:
Kristin Aoki
2024-05-22 12:02:25 -04:00
committed by GitHub
parent 3315205d15
commit 6c743f858d
11 changed files with 69 additions and 115 deletions

View File

@@ -2,7 +2,11 @@
exports[`SourceCodeModal renders as expected with default behavior 1`] = `
<BaseModal
bodyStyle={null}
bodyStyle={
Object {
"maxHeight": NaN,
}
}
close={[MockFunction]}
confirmAction={
<Button
@@ -32,11 +36,7 @@ exports[`SourceCodeModal renders as expected with default behavior 1`] = `
title="Edit Source Code"
>
<div
style={
Object {
"padding": "10px 30px",
}
}
className="px-4.5 pt-2.5"
>
<injectIntl(ShimmedIntlComponent)
innerRef="moCKrEf"

View File

@@ -7,7 +7,7 @@ import {
intlShape,
} from '@edx/frontend-platform/i18n';
import { Button } from '@openedx/paragon';
import { Button, useWindowSize } from '@openedx/paragon';
import messages from './messages';
import hooks from './hooks';
import BaseModal from '../BaseModal';
@@ -22,6 +22,8 @@ export const SourceCodeModal = ({
intl,
}) => {
const { saveBtnProps, value, ref } = hooks.prepareSourceCodeModal({ editorRef, close });
const { height } = useWindowSize();
return (
<BaseModal
close={close}
@@ -33,8 +35,9 @@ export const SourceCodeModal = ({
)}
isOpen={isOpen}
title={intl.formatMessage(messages.titleLabel)}
bodyStyle={{ maxHeight: (height - 180) }}
>
<div style={{ padding: '10px 30px' }}>
<div className="px-4.5 pt-2.5">
<CodeEditor
innerRef={ref}
value={value}