From ccb42319abf0679d998e15b6b47fff3ce95d4ca1 Mon Sep 17 00:00:00 2001 From: Jarrod Flesch Date: Tue, 15 Nov 2022 12:40:31 -0500 Subject: [PATCH] fix: corrects type for CollapsibleLabel example type, adjusts custom component filenames --- .../Array/{HeaderComponent.tsx => LabelComponent.tsx} | 0 test/fields/collections/Array/index.ts | 2 +- test/fields/collections/Collapsible/HeaderComponent.tsx | 7 ------- test/fields/collections/Collapsible/LabelComponent.tsx | 7 +++++++ test/fields/collections/Collapsible/index.ts | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) rename test/fields/collections/Array/{HeaderComponent.tsx => LabelComponent.tsx} (100%) delete mode 100644 test/fields/collections/Collapsible/HeaderComponent.tsx create mode 100644 test/fields/collections/Collapsible/LabelComponent.tsx diff --git a/test/fields/collections/Array/HeaderComponent.tsx b/test/fields/collections/Array/LabelComponent.tsx similarity index 100% rename from test/fields/collections/Array/HeaderComponent.tsx rename to test/fields/collections/Array/LabelComponent.tsx diff --git a/test/fields/collections/Array/index.ts b/test/fields/collections/Array/index.ts index 1b228e9e6..e5cbaead2 100644 --- a/test/fields/collections/Array/index.ts +++ b/test/fields/collections/Array/index.ts @@ -1,5 +1,5 @@ import type { CollectionConfig } from '../../../../src/collections/config/types'; -import { ArrayRowLabel } from './HeaderComponent'; +import { ArrayRowLabel } from './LabelComponent'; export const arrayDefaultValue = [ { text: 'row one' }, diff --git a/test/fields/collections/Collapsible/HeaderComponent.tsx b/test/fields/collections/Collapsible/HeaderComponent.tsx deleted file mode 100644 index dda7505fe..000000000 --- a/test/fields/collections/Collapsible/HeaderComponent.tsx +++ /dev/null @@ -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 {data.componentTitleField || fallback}; -}; diff --git a/test/fields/collections/Collapsible/LabelComponent.tsx b/test/fields/collections/Collapsible/LabelComponent.tsx new file mode 100644 index 000000000..5100e3407 --- /dev/null +++ b/test/fields/collections/Collapsible/LabelComponent.tsx @@ -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 {data.componentTitleField || fallback}; +}; diff --git a/test/fields/collections/Collapsible/index.ts b/test/fields/collections/Collapsible/index.ts index 954a9bd45..0f329943e 100644 --- a/test/fields/collections/Collapsible/index.ts +++ b/test/fields/collections/Collapsible/index.ts @@ -1,5 +1,5 @@ import type { CollectionConfig } from '../../../../src/collections/config/types'; -import { CollapsibleLabelComponent } from './HeaderComponent'; +import { CollapsibleLabelComponent } from './LabelComponent'; const CollapsibleFields: CollectionConfig = { slug: 'collapsible-fields',