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.)

68 lines (65 loc) 1.44 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _default = { name: 'TwoColumnBlock', type: 'object', title: 'To kolonner', titleEN: 'Two column', options: { semanticSanity: { exclude: true } }, fields: [{ name: 'disabled', title: 'Avslått?', titleEN: 'Disabled', type: 'boolean' }, { name: 'label', title: 'Tittel', titleEN: 'Title', type: 'string' }, { name: 'subtitle', title: 'Undertittel', titleEN: 'Subtitle', type: 'string' }, { name: 'firstColumn', title: 'Første kolonne', titleEN: 'First column', type: 'blockContent' }, { name: 'secondColumn', title: 'Andre kolonne', titleEN: 'Second column', type: 'blockContent' }, { name: 'anchor', title: 'Anker', titleEN: 'Anchor', type: 'string' }], preview: { select: { title: 'label', content: 'firstColumn' }, prepare(_ref) { var title = _ref.title, content = _ref.content; var text = content ? content[0].children.filter(child => child._type === 'span').map(span => span.text).join('') : ''; return { // eslint-disable-next-line no-nested-ternary title: title ? title : text ? text : '', subtitle: 'To kolonner' }; } } }; exports.default = _default; //# sourceMappingURL=TwoColumnBlock.js.map