# All files / label label.props.ts

100% Statements 3/3
100% Branches 2/2
100% Functions 1/1
100% Lines 3/3

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29

    1x
    1x
    1x

     import * as React from "react";
    import { LabelClassNameContract, ManagedClasses } from "@microsoft/fast-components-class-name-contracts-base";

    export enum LabelTag {
        label = "label",
        legend = "legend"
    }

    export interface LabelManagedClasses extends ManagedClasses<LabelClassNameContract> {}
    export interface LabelUnhandledProps extends React.HTMLAttributes<HTMLLabelElement | HTMLLegendElement> {}
    export interface LabelHandledProps extends LabelManagedClasses {
        /**
         * Label content
         */
        children?: React.ReactNode | React.ReactNode[];

        /**
         * If label is hidden (needed in contexts such as glyph-only search inputs)
         */
        hidden?: boolean;

        /**
         * Use the appropriate HTML tag type depending on context
         */
        tag?: LabelTag;
    }

    export type LabelProps = LabelHandledProps & LabelUnhandledProps;