office-ui-fabric-react
Version:
Reusable React components for building experiences for Office 365.
58 lines (48 loc) • 1.28 kB
text/typescript
import * as React from 'react';
/* tslint:enable:no-unused-variable */
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;
}