feat: ui overhaul (#676)
This commit is contained in:
committed by
GitHub
parent
5c86462859
commit
66b81e9228
31
packages/core/test/data/collections.mock.ts
Normal file
31
packages/core/test/data/collections.mock.ts
Normal file
@ -0,0 +1,31 @@
|
||||
/* eslint-disable import/prefer-default-export */
|
||||
import type { BaseField, Collection, Field } from '@staticcms/core/interface';
|
||||
|
||||
export const createMockCollection = <EF extends BaseField>(
|
||||
extra: Partial<Collection<EF>> = {},
|
||||
...fields: Field<EF>[]
|
||||
): Collection<EF> => ({
|
||||
name: 'mock_collection',
|
||||
label: 'Mock Collections',
|
||||
label_singular: 'Mock Collection',
|
||||
description:
|
||||
'The description is a great place for tone setting, high level information, and editing guidelines that are specific to a collection.\n',
|
||||
folder: 'mock_collection',
|
||||
summary: '{{title}}',
|
||||
sortable_fields: {
|
||||
fields: ['title'],
|
||||
default: {
|
||||
field: 'title',
|
||||
},
|
||||
},
|
||||
create: true,
|
||||
fields: [
|
||||
{
|
||||
label: 'Title',
|
||||
name: 'title',
|
||||
widget: 'string',
|
||||
},
|
||||
...fields,
|
||||
],
|
||||
...extra,
|
||||
});
|
Reference in New Issue
Block a user