Added general content blocks
This commit is contained in:
33
src/keystatic/blocks/general/sidenote.ts
Normal file
33
src/keystatic/blocks/general/sidenote.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import { fields } from '@keystatic/core'
|
||||
import { inline } from '@keystatic/core/content-components'
|
||||
|
||||
import { NOTE_TYPES } from '@/lib/constants/blocks/notes'
|
||||
|
||||
export const sidenote = inline({
|
||||
label: 'Sidenote',
|
||||
schema: {
|
||||
type: fields.select({
|
||||
label: 'Type',
|
||||
options: NOTE_TYPES,
|
||||
defaultValue: 'default',
|
||||
}),
|
||||
marker: fields.text({
|
||||
label: 'Marker',
|
||||
description: 'One or two characters, e.g. * † ‡ a.',
|
||||
defaultValue: '▾',
|
||||
validation: {
|
||||
isRequired: true,
|
||||
length: {
|
||||
max: 3,
|
||||
},
|
||||
},
|
||||
}),
|
||||
note: fields.text({
|
||||
label: 'Note',
|
||||
multiline: true,
|
||||
validation: {
|
||||
isRequired: true,
|
||||
},
|
||||
}),
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user