UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

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