UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

50 lines (49 loc) 1.33 kB
/// <reference types="react" /> import * as React from 'react'; import { ITheme, IStyle } from '../../Styling'; import { IRefObject, IComponentAs, IStyleFunctionOrObject } from '../../Utilities'; export interface ILabel { } export interface ILabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> { /** * Render the root element as another type. */ as?: IComponentAs<React.AllHTMLAttributes<HTMLElement>>; /** * Optional callback to access the ILabel interface. Use this instead of ref for accessing * the public methods and properties of the component. */ componentRef?: IRefObject<ILabel>; /** * Whether the associated form field is required or not * @defaultvalue false */ required?: boolean; /** * Renders the label as disabled. */ disabled?: boolean; /** * Theme provided by HOC. */ theme?: ITheme; /** * Styles for the label. */ styles?: IStyleFunctionOrObject<ILabelStyleProps, ILabelStyles>; } export interface ILabelStyles { /** * Styles for the root element. */ root: IStyle; } export interface ILabelStyleProps { /** * */ theme: ITheme; className?: string; disabled?: boolean; required?: boolean; }