fix: corrects type for CollapsibleLabel example type, adjusts custom component filenames

This commit is contained in:
Jarrod Flesch
2022-11-15 12:40:31 -05:00
parent 2bf0fffa0d
commit ccb42319ab
5 changed files with 9 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
import type { CollectionConfig } from '../../../../src/collections/config/types'; import type { CollectionConfig } from '../../../../src/collections/config/types';
import { ArrayRowLabel } from './HeaderComponent'; import { ArrayRowLabel } from './LabelComponent';
export const arrayDefaultValue = [ export const arrayDefaultValue = [
{ text: 'row one' }, { text: 'row one' },

View File

@@ -1,7 +0,0 @@
import React from 'react';
import { RowLabel } from '../../../../src/admin/components/forms/RowLabel/types';
export const CollapsibleLabelComponent: RowLabel = (props) => {
const { data, fallback } = props;
return <span style={{ color: 'coral' }}>{data.componentTitleField || fallback}</span>;
};

View File

@@ -0,0 +1,7 @@
import React from 'react';
import { RowLabelComponent } from '../../../../src/admin/components/forms/RowLabel/types';
export const CollapsibleLabelComponent: RowLabelComponent = (props) => {
const { data, fallback } = props;
return <span style={{ color: 'coral' }}>{data.componentTitleField || fallback}</span>;
};

View File

@@ -1,5 +1,5 @@
import type { CollectionConfig } from '../../../../src/collections/config/types'; import type { CollectionConfig } from '../../../../src/collections/config/types';
import { CollapsibleLabelComponent } from './HeaderComponent'; import { CollapsibleLabelComponent } from './LabelComponent';
const CollapsibleFields: CollectionConfig = { const CollapsibleFields: CollectionConfig = {
slug: 'collapsible-fields', slug: 'collapsible-fields',