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