/** * Copyright (c) Paymium. * * This source code is licensed under the MIT license found in the * LICENSE file in the root of this projects source tree. */ import { useContext } from './context'; import { ComponentType, forwardRef } from 'react'; import { composeEventHandlers } from '@crossed/core'; export const createLabelText = (StyledText: ComponentType

) => forwardRef & { children: string | string[] }>( (props, ref) => { const { id, inputRef } = useContext(); return ( { inputRef?.current?.focus?.(); })} /> ); } );