Foundation + Schemas
This commit is contained in:
25
src/keystatic/fields/content/cover.ts
Normal file
25
src/keystatic/fields/content/cover.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { fields } from '@keystatic/core'
|
||||
|
||||
import { assets } from '@/lib/content/assets'
|
||||
|
||||
export const cover = (collection: string) =>
|
||||
fields.object(
|
||||
{
|
||||
image: fields.image({
|
||||
label: 'Image',
|
||||
...assets(collection),
|
||||
}),
|
||||
alt: fields.text({
|
||||
label: 'Alt text',
|
||||
}),
|
||||
caption: fields.text({
|
||||
label: 'Caption',
|
||||
}),
|
||||
credit: fields.text({
|
||||
label: 'Credit',
|
||||
}),
|
||||
},
|
||||
{
|
||||
label: 'Cover',
|
||||
},
|
||||
)
|
||||
Reference in New Issue
Block a user