import { FunctionComponent, default as React } from 'react'; import { FormOnColor } from '../../constants'; export type LabelText = { hideFromScreenReader?: boolean; text: string; type?: 'normal' | 'subdued'; }; export type LabelTags = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'span' | 'label' | 'p' | 'legend'; export interface LabelProps { /** Component shown after label - discourage use of this */ afterLabelChildren?: React.ReactNode; /** Sets the content of the Label */ children?: React.ReactNode; /** Sets a tag that describes whether the form field is required or optional */ formFieldTag?: React.ReactNode; /** Adds custom classes to the label tag. */ labelClassName?: string; /** Adds custom classes to the label text. */ labelTextClassName?: string; /** Adds custom classes to the element. */ className?: string; /** Id that is put on the "for" attribute of the label */ htmlFor?: string; /** Changes the underlying element of the label */ htmlMarkup?: LabelTags; /** Id som plasseres på