docs: Fix RowLabel code snippet that causes compilation error (#4947)

Co-authored-by: smarten <user@example.com>
This commit is contained in:
ovalice
2024-05-01 21:42:43 +02:00
committed by GitHub
parent 93109ec84a
commit 182d5db6de

View File

@@ -67,6 +67,7 @@ properties:
```ts
import { CollectionConfig } from 'payload/types'
import { RowLabelArgs } from 'payload/dist/admin/components/forms/RowLabel/types'
export const ExampleCollection: CollectionConfig = {
slug: 'example-collection',
@@ -101,7 +102,7 @@ export const ExampleCollection: CollectionConfig = {
],
admin: {
components: {
RowLabel: ({ data, index }) => {
RowLabel: ({ data, index }: RowLabelArgs) => {
return data?.title || `Slide ${String(index).padStart(2, '0')}`
},
},