@navinc/base-react-components
Version:
Nav's Pattern Library
17 lines (16 loc) • 640 B
TypeScript
import { HTMLAttributes, ReactNode } from 'react';
export type LabelProps = HTMLAttributes<HTMLLabelElement> & {
/** Display label text */
label?: ReactNode;
/** Adds the "optional" string to the end of the label */
optional?: boolean;
required?: boolean;
};
/** Wraps children in a `<label>` */
export declare const Label: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLLabelElement> & {
/** Display label text */
label?: ReactNode;
/** Adds the "optional" string to the end of the label */
optional?: boolean;
required?: boolean;
} & import("react").RefAttributes<HTMLLabelElement>>;