UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

25 lines 1.13 kB
import * as tslib_1 from "tslib"; import * as React from 'react'; import { Checkbox } from 'office-ui-fabric-react/lib/Checkbox'; var CheckboxBasicExample = /** @class */ (function (_super) { tslib_1.__extends(CheckboxBasicExample, _super); function CheckboxBasicExample(props) { var _this = _super.call(this, props) || this; _this.state = { isChecked: false }; _this._onCheckboxChange = _this._onCheckboxChange.bind(_this); return _this; } CheckboxBasicExample.prototype.render = function () { var isChecked = this.state.isChecked; return (React.createElement("div", null, React.createElement(Checkbox, { label: 'Standard checkbox', onChange: this._onCheckboxChange, ariaDescribedBy: 'descriptionID' }))); }; CheckboxBasicExample.prototype._onCheckboxChange = function (ev, isChecked) { console.log("The option has been changed to " + isChecked + "."); }; return CheckboxBasicExample; }(React.Component)); export { CheckboxBasicExample }; //# sourceMappingURL=Checkbox.Basic.Example.js.map