fix: corrects type for CollapsibleLabel example type, adjusts custom component filenames
This commit is contained in:
@@ -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' },
|
||||
|
||||
@@ -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>;
|
||||
};
|
||||
7
test/fields/collections/Collapsible/LabelComponent.tsx
Normal file
7
test/fields/collections/Collapsible/LabelComponent.tsx
Normal 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>;
|
||||
};
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user