home widget
This commit is contained in:
parent
eaf1dfdfc6
commit
53cfb252e2
@ -17,8 +17,7 @@ export const WidgetTypeSchema = z.enum([
|
||||
'page-card',
|
||||
'markdown-text',
|
||||
'layout-container-widget',
|
||||
'file-browser',
|
||||
'home'
|
||||
'file-browser'
|
||||
]);
|
||||
|
||||
export type WidgetType = z.infer<typeof WidgetTypeSchema>;
|
||||
@ -174,22 +173,6 @@ export const FileBrowserWidgetSchema = z.object({
|
||||
export type FileBrowserWidgetProps = z.infer<typeof FileBrowserWidgetSchema>;
|
||||
|
||||
|
||||
// =========================================
|
||||
// Home Widget
|
||||
// =========================================
|
||||
export const HomeWidgetSchema = z.object({
|
||||
sortBy: z.enum(['latest', 'top']).default('latest'),
|
||||
viewMode: z.enum(['grid', 'large', 'list']).default('grid'),
|
||||
showCategories: z.boolean().default(false),
|
||||
categorySlugs: z.string().optional().default(''),
|
||||
showSortBar: z.boolean().default(true),
|
||||
showFooter: z.boolean().default(true),
|
||||
variables: WidgetVariablesSchema,
|
||||
});
|
||||
|
||||
export type HomeWidgetProps = z.infer<typeof HomeWidgetSchema>;
|
||||
|
||||
|
||||
// =========================================
|
||||
// Union of All Widget Props (Optional Helper)
|
||||
// =========================================
|
||||
|
||||
Loading…
Reference in New Issue
Block a user