📝 Add Contribute docs
This commit is contained in:
@ -95,6 +95,7 @@ export const option = {
|
||||
object: <T extends z.ZodRawShape>(schema: T) => z.object(schema),
|
||||
literal: <T extends string>(value: T) => z.literal(value),
|
||||
string: z.string().optional(),
|
||||
boolean: z.boolean().optional(),
|
||||
enum: <T extends string>(values: readonly [T, ...T[]]) =>
|
||||
z.enum(values).optional(),
|
||||
number: z.number().or(variableStringSchema).optional(),
|
||||
@ -123,7 +124,7 @@ export const option = {
|
||||
defaultValue: items[0],
|
||||
}),
|
||||
variableId: z.string().optional().layout({
|
||||
input: 'variableDropdown',
|
||||
inputType: 'variableDropdown',
|
||||
}),
|
||||
})
|
||||
)
|
||||
|
@ -117,7 +117,6 @@ export type BlockDefinition<
|
||||
auth?: Auth
|
||||
options?: Options | undefined
|
||||
fetchers?: FetcherDefinition<Auth, Options>[]
|
||||
isDisabledInPreview?: boolean
|
||||
actions: ActionDefinition<Auth, Options>[]
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ export interface ZodLayoutMetadata<
|
||||
> {
|
||||
accordion?: string
|
||||
label?: string
|
||||
input?: 'variableDropdown' | 'textarea' | 'password'
|
||||
inputType?: 'variableDropdown' | 'textarea' | 'password'
|
||||
defaultValue?: T extends ZodDate ? string : TInferred
|
||||
placeholder?: string
|
||||
helperText?: string
|
||||
@ -18,7 +18,6 @@ export interface ZodLayoutMetadata<
|
||||
fetcher?: T extends OptionableZodType<ZodString> ? string : never
|
||||
itemLabel?: T extends OptionableZodType<ZodArray<any>> ? string : never
|
||||
isOrdered?: T extends OptionableZodType<ZodArray<any>> ? boolean : never
|
||||
isHidden?: boolean
|
||||
moreInfoTooltip?: string
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user