diff --git a/website/src/repl/components/incrementor/Incrementor.jsx b/website/src/repl/components/incrementor/Incrementor.jsx new file mode 100644 index 00000000..1bad0a8d --- /dev/null +++ b/website/src/repl/components/incrementor/Incrementor.jsx @@ -0,0 +1,52 @@ +import { cn } from 'tailwind_utils.mjs'; +import { Textbox } from '../textbox/Textbox'; + +function IncButton({ children, label, className, ...buttonProps }) { + return ( + + ); +} +export function Incrementor({ onChange, value, min = -Infinity, max = Infinity, className }) { + value = parseInt(value); + value = isNaN(value) ? '' : value; + return ( +