Files
payload/test/fields/collections/Text/CustomLabel.tsx
2024-03-20 11:09:22 -04:00

16 lines
331 B
TypeScript

'use client'
import { useFieldProps } from '@payloadcms/ui/forms/FieldPropsProvider'
import React from 'react'
const CustomLabel = () => {
const { path } = useFieldProps()
return (
<label className="custom-label" htmlFor={`field-${path.replace(/\./g, '__')}`}>
#label
</label>
)
}
export default CustomLabel