UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

1 lines 1.92 kB
module.exports = "import * as React from 'react';\nimport { Button } from './Button';\n\nexport interface IButton {\n /**\n * Focuses the button.\n */\n focus();\n}\n\nexport interface IButtonProps extends React.HTMLProps<HTMLButtonElement | HTMLAnchorElement | Button> {\n /**\n * If provided, this component will be rendered as an anchor.\n * @default ElementType.anchor\n */\n href?: string;\n\n /**\n * The type of button to render.\n * @defaultvalue ButtonType.normal\n */\n buttonType?: ButtonType;\n\n /**\n * The button icon shown in command or hero type.\n */\n icon?: string;\n\n /**\n * Description of the action this button takes.\n * Only used for compound buttons\n */\n description?: string;\n\n /**\n * Whether the button is disabled\n */\n disabled?: boolean;\n\n /**\n * If provided, additional class name to provide on the root element.\n */\n className?: string;\n\n /**\n * Event handler for click event.\n */\n onClick?: React.MouseEventHandler<HTMLButtonElement | HTMLAnchorElement | Button>;\n\n /**\n * The aria label of the button for the benefit of screen readers.\n */\n ariaLabel?: string;\n\n /**\n * Detailed description of the button for the benefit of screen readers.\n *\n * Besides the compound button, other button types will need more information provided to screen reader.\n */\n ariaDescription?: string;\n\n /**\n * @deprecated\n * Deprecated at v0.56.2, to be removed at >= v1.0.0. Just pass in button props instead;\n * they will be mixed into the button/anchor element rendered by the component.\n */\n rootProps?: React.HTMLProps<HTMLButtonElement> | React.HTMLProps<HTMLAnchorElement>;\n}\n\nexport enum ElementType {\n /** <button> element. */\n button,\n /** <a> element. */\n anchor\n}\n\nexport enum ButtonType {\n normal,\n primary,\n hero,\n compound,\n command,\n icon\n}";