Files
payloadcms/test/fields/collections/Tabs/shared.ts
2024-03-08 14:42:24 -05:00

56 lines
1.2 KiB
TypeScript

import type { TabsField } from '../../payload-types.js'
import { getBlocksFieldSeedData } from '../Blocks/shared.js'
import { localizedTextValue, namedTabText } from './constants.js'
export const tabsDoc: Partial<TabsField> = {
array: [
{
text: "Hello, I'm the first row",
},
{
text: 'Second row here',
},
{
text: 'Here is some data for the third row',
},
],
blocks: getBlocksFieldSeedData(),
group: {
number: 12,
},
nestedTab: {
text: 'Some text in a nested, named tab',
},
tab: {
array: [
{
text: "Hello, I'm the first row, in a named tab",
},
{
text: 'Second row here, in a named tab',
},
{
text: 'Here is some data for the third row, in a named tab',
},
],
text: namedTabText,
},
localizedTab: {
text: localizedTextValue,
},
accessControlTab: {
text: 'cannot be read',
},
hooksTab: {
beforeValidate: false,
beforeChange: false,
afterChange: false,
afterRead: false,
},
textarea: 'Here is some text that goes in a textarea',
anotherText: 'Super tired of writing this text',
textInRow: 'hello',
numberInRow: 235,
}