UNPKG

@uifabric/experiments

Version:

Experimental React components for building experiences for Office 365.

30 lines 1.45 kB
import * as tslib_1 from "tslib"; import * as React from 'react'; import { SignalField } from '../SignalField'; import { YouCheckedOutSignal, AwaitingApprovalSignal } from '../Signals'; import { lorem } from '@uifabric/example-app-base'; import { Checkbox } from 'office-ui-fabric-react/lib/Checkbox'; var text = lorem(4); var SignalFieldBasicExample = /** @class */ (function (_super) { tslib_1.__extends(SignalFieldBasicExample, _super); function SignalFieldBasicExample(props) { var _this = _super.call(this, props) || this; _this._onModeChange = function (event, checked) { _this.setState({ mode: checked ? 'wide' : 'compact' }); }; _this.state = { mode: 'compact' }; return _this; } SignalFieldBasicExample.prototype.render = function () { return (React.createElement("div", null, React.createElement(Checkbox, { label: "Wide?", onChange: this._onModeChange, checked: this.state.mode === 'wide' }), React.createElement(SignalField, { signalsFieldMode: this.state.mode, before: [React.createElement(YouCheckedOutSignal, { key: "a" })], after: [React.createElement(AwaitingApprovalSignal, { key: "b" })] }, text))); }; return SignalFieldBasicExample; }(React.Component)); export { SignalFieldBasicExample }; //# sourceMappingURL=SignalField.Basic.Example.js.map