jsketcher/web/app/cad/mdf/ui/field.ts
2022-06-25 15:19:47 -07:00

20 lines
No EOL
356 B
TypeScript

import {Coercable} from "cad/craft/schema/schema";
export interface FieldBasicProps {
name: string;
label?: string;
defaultValue?: Coercable;
optional?: boolean
}
export function fieldToSchemaGeneric(props: FieldBasicProps) {
return {
label: props.label,
defaultValue: props.defaultValue,
optional: !!props.optional,
}
}