mini repl max height option
This commit is contained in:
parent
18ae82174d
commit
6224cd40d4
1 changed files with 2 additions and 1 deletions
|
|
@ -27,6 +27,7 @@ export function MiniRepl({
|
||||||
punchcardLabels = true,
|
punchcardLabels = true,
|
||||||
claviature,
|
claviature,
|
||||||
claviatureLabels,
|
claviatureLabels,
|
||||||
|
maxHeight,
|
||||||
}) {
|
}) {
|
||||||
const code = tunes ? tunes[0] : tune;
|
const code = tunes ? tunes[0] : tune;
|
||||||
const id = useMemo(() => s4(), []);
|
const id = useMemo(() => s4(), []);
|
||||||
|
|
@ -154,7 +155,7 @@ export function MiniRepl({
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div className="overflow-auto relative p-1">
|
<div className="overflow-auto relative p-1" style={maxHeight ? { maxHeight: `${maxHeight}px` } : {}}>
|
||||||
<div
|
<div
|
||||||
ref={(el) => {
|
ref={(el) => {
|
||||||
if (!editorRef.current) {
|
if (!editorRef.current) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue