Make filter mode configurable.

This commit is contained in:
Dermot Duffy
2023-01-29 14:26:49 -08:00
parent 17c4a5a85f
commit 0caf64ba82
9 changed files with 142 additions and 26 deletions
+10
View File
@@ -1078,6 +1078,9 @@ const galleryThumbnailControlsDefaults = {
const galleryConfigDefault = {
controls: {
thumbnails: galleryThumbnailControlsDefaults,
filter: {
mode: 'right' as const,
},
},
};
@@ -1092,6 +1095,13 @@ const galleryConfigSchema = z
thumbnails: gallerythumbnailsControlSchema.default(
galleryConfigDefault.controls.thumbnails,
),
filter: z
.object({
mode: z
.enum(['none', 'left', 'right'])
.default(galleryConfigDefault.controls.filter.mode),
})
.default(galleryConfigDefault.controls.filter),
})
.default(galleryConfigDefault.controls),
})