* test: passing collapsible fields test suite * chore: passes indexPath into ArrayRow & updates path in collapsible field * fix: collapsible paths and indexPath prop types * chore: improves path and schemaPath syntax * leftover * chore: updates selectors in collapsibles tests * chore: updates selector in live-preview test suite --------- Co-authored-by: Jacob Fletcher <jacobsfletch@gmail.com>
14 lines
387 B
TypeScript
14 lines
387 B
TypeScript
'use client'
|
|
|
|
import type { RowLabelComponent } from 'payload/types'
|
|
|
|
import { useRowLabel } from '@payloadcms/ui/forms/RowLabel/Context'
|
|
import React from 'react'
|
|
|
|
export const ArrayRowLabel: RowLabelComponent = () => {
|
|
const { data } = useRowLabel<{ title: string }>()
|
|
return (
|
|
<div style={{ color: 'coral', textTransform: 'uppercase' }}>{data.title || 'Untitled'}</div>
|
|
)
|
|
}
|