feat: bool

This commit is contained in:
cha0s 2021-01-30 14:19:01 -06:00
parent b92f4f04c3
commit d3e3473ce8

View File

@ -25,6 +25,16 @@ const Literal = ({
const patch = useJsonPatcher();
const valueComponent = (path, type, {value}) => {
switch (type) {
case 'bool':
return (
<input
type="checkbox"
onChange={(event) => {
onChange(event, event.target.checked, path);
}}
value={null === value ? false : value}
/>
);
case 'number':
return (
<Number