working
This commit is contained in:
parent
5cd98880ca
commit
50f076084f
12 changed files with 237 additions and 43 deletions
15
website/src/repl/components/textbox/Textbox.jsx
Normal file
15
website/src/repl/components/textbox/Textbox.jsx
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { cn } from 'tailwind_utils.mjs';
|
||||
// type TextboxProps = {
|
||||
// onChange: (val: string | number) => void;
|
||||
// ...inputProps
|
||||
// }
|
||||
export function Textbox(props) {
|
||||
const {onChange, className, ...inputProps} = props
|
||||
return (
|
||||
<input
|
||||
className={cn('p-1 bg-background rounded-md my-2 border-foreground', props.className)}
|
||||
onChange={(e) => props.onChange(e.target.value)}
|
||||
{...inputProps}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue