Files
ipal-kit/src/modules/block-library/shared.ts
T
Radosław SmolińskiandClaude Opus 5.5 2d1cc0e77d Block library: 15 blocks, registry, primitives, templates, manifest, eject
- @intecion/ipal-kit/blocks: libraryBlocks() opt-in, one builder per block, field
  builders, option merging, blockLibraryManifest, faqItemsFromLayout
- @intecion/ipal-kit/blocks/rsc: createBlockRegistry, the block components and UI
  primitives (token utilities only; next/image and next/link passed in)
- @intecion/ipal-kit/templates: 10 page templates as createSeeder data
- createSeeder: { $form: title } references
- ipal-blocks eject <block>
- tests: options, rendering and a11y per block, Payload + seeding, GraphQL, admin
  wording, schema snapshot (versioning), eject imports
- shorter admin labels: link "New tab", table of contents "Show contents"

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 14:05:47 +01:00

23 lines
727 B
TypeScript

import type { SelectField } from 'payload'
import { adminText } from './define.js'
/** Column count for grids, in the sidebar. Values are words, so they are valid GraphQL enum names. */
export const COLUMNS = ['two', 'three', 'four'] as const
export type Columns = (typeof COLUMNS)[number]
export function columnsField(defaultValue: Columns = 'three'): SelectField {
return {
name: 'columns',
type: 'select',
admin: { position: 'sidebar' },
defaultValue,
label: adminText('Columns', 'Kolumny'),
options: [
{ label: adminText('Two', 'Dwie'), value: 'two' },
{ label: adminText('Three', 'Trzy'), value: 'three' },
{ label: adminText('Four', 'Cztery'), value: 'four' },
],
}
}