feat: Vector literal

This commit is contained in:
cha0s 2021-01-30 16:07:10 -06:00
parent 654c223253
commit f2cf339be1

View File

@ -3,6 +3,7 @@ import {join} from 'path';
import {PropTypes, React} from '@latus/react';
import {
Number,
Vector,
} from '@persea/core';
import {
JsonComponent,
@ -97,6 +98,15 @@ const Literal = ({
json={null === value ? {} : value}
/>
);
case 'vector':
return (
<Vector
onChange={(event, value) => {
onChange(event, value, path);
}}
value={null === value ? [0, 0] : value}
/>
);
default:
return null;
}