UNPKG

@primer/react

Version:

An implementation of GitHub's Primer Design System using React

17 lines (16 loc) 842 B
import { FormControlProps } from "./FormControl.js"; //#region src/FormControl/_FormControlContext.d.ts interface FormControlForwardedProps extends Pick<FormControlProps, 'disabled' | 'id' | 'required'> { ['aria-describedby']?: string; } /** * Make any component compatible with `FormControl`'s automatic wiring up of accessibility attributes & validation by * reading the props from this hook and merging them with the passed-in props. If used outside of `FormControl`, this * hook has no effect. * * @param externalProps The external props passed to this component. If provided, these props will be merged with the * `FormControl` props, with external props taking priority. */ declare function useFormControlForwardedProps<P>(externalProps: P): P & FormControlForwardedProps; //#endregion export { useFormControlForwardedProps };