23 lines
536 B
TypeScript
23 lines
536 B
TypeScript
import { fields } from '@keystatic/core'
|
|
import { repeating } from '@keystatic/core/content-components'
|
|
|
|
import { DEFINITION_VARIANTS } from '@/lib/constants/blocks/definitions'
|
|
|
|
export const definitions = repeating({
|
|
label: 'Definitions',
|
|
description: 'A list of terms defined for this article only',
|
|
children: ['definition'],
|
|
validation: {
|
|
children: {
|
|
min: 1,
|
|
},
|
|
},
|
|
schema: {
|
|
variant: fields.select({
|
|
label: 'Style',
|
|
options: DEFINITION_VARIANTS,
|
|
defaultValue: 'cross',
|
|
}),
|
|
},
|
|
})
|