@workday/canvas-kit-react
Version:
The parent module that contains all Workday Canvas Kit React components
27 lines • 952 B
TypeScript
/**
* Adds the necessary props to a `Label` component.
* Used by the FormField.Label subcomponent and other input type components
*/
export declare const useFormFieldLabel: import("@workday/canvas-kit-react/common").BehaviorHook<{
state: {
id: string;
error: "error" | "alert" | undefined; /**
* Provide an `id` attribute for `id/aria-labelledby` links between the label and any other
* element
*/
isRequired: boolean;
orientation: "horizontal" | "vertical" | "horizontalEnd" | "horizontalStart";
};
events: {};
}, {
/**
* Provide an `for` attribute for `for/id` links between a `label/input` respectively
*/
readonly htmlFor: `input-${string}`;
/**
* Provide an `id` attribute for `id/aria-labelledby` links between the label and any other
* element
*/
readonly id: `label-${string}`;
}>;
//# sourceMappingURL=useFormFieldLabel.d.ts.map