added initial pre-validation per node

This commit is contained in:
ari committed 2022-05-18 22:23:57 -04:00
1 parent 621f43e5c8
commit 40690293a8
31 files changed
+519 -167

No files matched your search

@@ -10,6 +10,10 @@
background-color: var(--secondary);
}
.input-boolean.disabled:hover, .input-boolean.disabled:hover * {
cursor: not-allowed;
}
.input-boolean:hover, .input-boolean:hover * {
cursor: pointer;
background-color: var(--secondary-opaque);
@@ -4,14 +4,16 @@ export interface Props {
label: string;
value: boolean;
onChange: (v: boolean) => void;
disabled?: boolean;
}
export default function InputBoolean({
label,
value = false,
onChange,
disabled = false,
}: Props) {
return <div className="input-boolean" onClick={() => onChange(!value)}>
<input type="checkbox" checked={value} onChange={() => { }} />
return <div className={["input-boolean", disabled ? 'disabled' : ''].join(' ')} onClick={() => onChange(!value)}>
<input type="checkbox" checked={value} onChange={() => { }} disabled={disabled} />
<label>{label}</label>
</div>
}
+4 -1
View File
@@ -229,7 +229,10 @@ export const useInputTextAreaStyles = createAppUseStyles<{ resizable: boolean }>
return {
input: ({ resizable }) => ({
...styles.input,
resize: resizable ? 'both' : 'none'
resize: resizable ? 'both' : 'none',
minWidth: "calc(100% - 2em)",
maxWidth: "calc(100% - 2em)",
minHeight: "8em"
})
}
});