Files
payload/test/fields/collections/Text/CustomLabel.tsx
2024-03-19 00:59:56 -04:00

16 lines
304 B
TypeScript

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