UNPKG

@withjoy/joykit

Version:

UI Component Library for Joy web

47 lines (46 loc) 1.41 kB
import React from 'react'; import { SpacingExternalProps, Props } from '../../common/props'; export interface InputLabelProps extends Props, React.LabelHTMLAttributes<HTMLLabelElement> { /** * If true, the label will be displayed in disabled state. */ disabled?: boolean; /** * If true, the label will be displayed in error state. */ error?: boolean; /** * A unique identifier for the label; */ id: string; /** * Optional secondary text to be display to the right of the label. */ labelInfo?: string; /** * If true, the label will indicate that the input is required. */ required?: boolean; } /** * A set of dynamic style props that can be used to ensure * consistent InputLabel styling. */ interface ComposedInputLabelProps extends SpacingExternalProps { } interface InternalInputLabelProps extends InputLabelProps, ComposedInputLabelProps { /** * Label Content */ children?: string; /** * Unique identifier of the form control that the label is labelling. * * A <InputLabel /> can have both a `fieldID` and a contained control as long as * the `fieldID` points to the contained control element. */ fieldID?: string; hidden?: boolean; } export declare const InputLabel: React.FC<InternalInputLabelProps>; export {};