2
0

📝 Add Contribute docs

This commit is contained in:
Baptiste Arnaud
2024-01-03 16:29:41 +01:00
parent b3957295bd
commit 65f4fb0d7a
66 changed files with 1453 additions and 519 deletions

View File

@@ -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',
}),
})
)