latest work

This commit is contained in:
ari committed 2022-06-12 16:42:44 -04:00
1 parent 651ba865b1
commit 240f8faef7
13 files changed
+323 -57

No files matched your search

+4 -2
View File
@@ -11,12 +11,14 @@ export interface Props<T extends {}> {
value: T;
onChange: (v: T) => void;
error?: JSX.Element | string,
className?: string;
}
export default function InputYaml<T>({
export default function InputYaml<T extends {}>({
label,
error: incmError,
value = {} as any,
onChange,
className,
}: Props<T>) {
const [{ text, error }, setState] = useState<{
text: string,
@@ -50,7 +52,7 @@ export default function InputYaml<T>({
}
}
}, [text], 1000)
return <InputWrapper label={label} error={error}>
return <InputWrapper className={className} label={label} error={error}>
<CodeMirror
theme={"dark"}
value={text}