office-ui-fabric-react
Version: 
Reusable React components for building experiences for Office 365.
1 lines • 1.77 kB
JavaScript
define([], function() { return "import * as React from 'react';\nimport { Checkbox } from './Checkbox';\n\n/**\n * Checkbox class interface.\n */\nexport interface ICheckbox {\n  /** Gets the current checked state. */\n  checked: boolean;\n\n  /** Sets focus to the checkbox. */\n  focus(): void;\n}\n\n/**\n * Checkbox properties.\n */\nexport interface ICheckboxProps extends React.Props<Checkbox> {\n  /**\n   * Additional class name to provide on the root element, in addition to the ms-Checkbox class.\n   */\n  className?: string;\n\n  /**\n   * Checked state. Mutually exclusive to \"defaultChecked\". Use this if you control the checked state at a higher\n   * level and plan to pass in the correct value based on handling onChange events and re-rendering.\n   */\n  checked?: boolean;\n\n  /**\n   * Default checked state. Mutually exclusive to \"checked\". Use this if you want an uncontrolled component, and\n   * want the Checkbox instance to maintain its own state.\n   */\n  defaultChecked?: boolean;\n\n  /**\n   * Label to display next to the checkbox.\n   */\n  label?: string;\n\n  /**\n   * Disabled state of the checkbox.\n   */\n  disabled?: boolean;\n\n  /**\n   * Callback that is called when the checked value has changed.\n   */\n  onChange?: (ev?: React.FormEvent, isChecked?: boolean) => void;\n\n  /**\n   * Optional input props that will be mixed into the input element, *before* other props are applied. This allows\n   * you to extend the input element with additional attributes, such as data-automation-id needed for automation.\n   * Note that if you provide, for example, \"disabled\" as well as \"inputProps.disabled\", the former will take\n   * precedence over the later.\n   */\n  inputProps?: React.Props<HTMLInputElement>;\n}\n"; });