mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-17 22:15:44 +01:00
20 lines
No EOL
356 B
TypeScript
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,
|
|
}
|
|
} |