fieldsvariable
import { fields } from '@mortar-kit/core'
const fields: { text, textarea, number, boolean, select, url, image, file, list, object, date, reference }Field helpers used to declare the schema of a brick or a collection.
Members
text: (o: TextOptions) => Field<string>textarea: (o: TextOptions) => Field<string>number: (o: Common<number> & { min?: number; max?: number; step?: number }) => Field<number>boolean: (o: Common<boolean>) => Field<boolean>select: (o: Common<keyof O & string> & { options: O }) => Field<keyof O & string>url: (o: Common<string> & { placeholder?: string; required?: boolean }) => Field<string>file: (o: Common<Partial<FileValue>> & { accept?: readonly AssetKind[]; required?: boolean }) => Field<FileValue>object: (o: Common<InferFields<F>> & { fields: F }) => Field<InferFields<F>>date: (o: Common<string> & { required?: boolean }) => Field<string>reference: (o: Common<string> & { collection: string; required?: boolean }) => Field<string>