mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-06 08:25:19 +01:00
24 lines
No EOL
533 B
TypeScript
24 lines
No EOL
533 B
TypeScript
import {OperationParamValue, ValueResolver} from "cad/craft/schema/schema";
|
|
import {ParamsPathSegment} from "cad/craft/wizard/wizardTypes";
|
|
|
|
export interface FieldBasicProps {
|
|
|
|
name: ParamsPathSegment;
|
|
|
|
label?: string;
|
|
|
|
defaultValue?: OperationParamValue;
|
|
|
|
optional?: boolean;
|
|
|
|
resolve?: ValueResolver<any, any>
|
|
}
|
|
|
|
export function fieldToSchemaGeneric(props: FieldBasicProps) {
|
|
return {
|
|
label: props.label,
|
|
defaultValue: props.defaultValue,
|
|
optional: !!props.optional,
|
|
resolve: props.resolve
|
|
}
|
|
} |