UNPKG

@seidhr/sanity-plugin-muna-schemas

Version:

Muna or ᛗᚢᚾᚨ means remember in norse. Muna is a schema for the Sanity Studio that enables detailed descriptions of cultural heritage objects and knowledge about their contexts as well as pages about them (or anything else really.)

35 lines (32 loc) 1.01 kB
import { GiStarFormation } from 'react-icons/gi' import { coalesceLabel } from '../../../../helpers/coalesceLabel' import { featured } from '../../../properties/datatype' import { contributionAssignedBy, timespanSingleton, tookPlaceAt } from '../../../properties/object' export default { name: 'BeginningOfExistence', type: 'document', title: 'Start på eksistens', titleEN: 'Beginning of existence', icon: GiStarFormation, fields: [ featured, contributionAssignedBy, timespanSingleton, tookPlaceAt ], preview: { select: { contributor: 'contributionAssignedBy.0.assignedActor.label', contributorName: 'contributionAssignedBy.0.usedName.content', edtf: 'timespan.edtf', }, prepare(selection) { const { contributor, contributorName, edtf } = selection const title = `Beginning of existence, by ${coalesceLabel(contributor) || contributorName || 'unknown'}` return { title: title, subtitle: edtf } }, }, }