UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

31 lines (30 loc) 986 B
/** * Web FormLabel Component * */ import type { HTMLAttributes, ReactNode, Ref } from 'react'; import type { FormElementProps } from '../../shared/helpers/filterValidProps'; import type { DynamicElement, SpacingProps } from '../../shared/types'; export type FormLabelProps = { forId?: string; element?: DynamicElement<HTMLLabelElement>; text?: ReactNode; size?: 'basis' | 'medium' | 'large'; id?: string; skeleton?: boolean; label?: ReactNode; vertical?: boolean; srOnly?: boolean; ref?: Ref<HTMLElement>; /** * If set to `true`, the label will behave as not interactive. */ disabled?: boolean; /** * For internal use only */ labelDirection?: FormElementProps['labelDirection']; }; export type FormLabelAllProps = FormLabelProps & HTMLAttributes<HTMLLabelElement> & SpacingProps; declare function FormLabel(localProps: FormLabelAllProps): import("react/jsx-runtime").JSX.Element; export default FormLabel;