test: updates text field config imports to relative imports

This commit is contained in:
PatrikKozak
2024-03-15 15:54:54 -04:00
parent c5f915651c
commit 2dc425b083
2 changed files with 6 additions and 3 deletions

View File

@@ -1,8 +1,10 @@
'use client'
import { useField, useFormFields, useFormSubmitted } from '@payloadcms/ui'
import React from 'react'
import { useFormFields, useFormSubmitted } from '../../../../packages/ui/src/forms/Form/context.js'
import { useField } from '../../../../packages/ui/src/forms/useField/index.js'
const CustomError: React.FC<any> = (props) => {
const { path: pathFromProps } = props
const submitted = useFormSubmitted()

View File

@@ -1,10 +1,11 @@
'use client'
import { useFieldPath } from '@payloadcms/ui'
import React from 'react'
import { useFieldProps } from '../../../../packages/ui/src/forms/FieldPropsProvider/index.js'
const CustomLabel = () => {
const { path } = useFieldPath()
const { path } = useFieldProps()
return (
<label className="custom-label" htmlFor={`field-${path.replace(/\./g, '__')}`}>
#label