started workshop pages

This commit is contained in:
Felix Roos 2023-05-26 14:12:53 +02:00
parent 2177e13b49
commit 82225f0b81
13 changed files with 431 additions and 5 deletions

View file

@ -20,10 +20,11 @@ export function MiniRepl({
enableKeyboard,
drawTime,
punchcard,
span,
canvasHeight = 200,
theme,
}) {
drawTime = drawTime || (punchcard ? [0, 4] : undefined);
drawTime = drawTime || (punchcard ? span || [0, 4] : undefined);
const evalOnMount = !!drawTime;
const drawContext = useCallback(
!!drawTime ? (canvasId) => document.querySelector('#' + canvasId)?.getContext('2d') : null,