UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

37 lines 1.43 kB
import * as tslib_1 from "tslib"; import * as React from 'react'; import { BaseComponent, css } from '../../Utilities'; import { Icon } from '../../Icon'; import * as stylesImport from './Check.scss'; var styles = stylesImport; var Check = /** @class */ (function (_super) { tslib_1.__extends(Check, _super); function Check() { return _super !== null && _super.apply(this, arguments) || this; } Check.prototype.shouldComponentUpdate = function (newProps) { return this.props.isChecked !== newProps.isChecked || this.props.checked !== newProps.checked; }; Check.prototype.render = function () { var _a = this.props, isChecked = _a.isChecked, checked = _a.checked; isChecked = isChecked || checked; return (React.createElement("div", { className: css('ms-Check', styles.root, (_b = {}, _b["is-checked " + styles.rootIsChecked] = isChecked, _b)) }, Icon({ className: 'ms-Check-circle ' + styles.circle, iconName: 'CircleRing' }), Icon({ className: 'ms-Check-check ' + styles.check, iconName: 'StatusCircleCheckmark' }))); var _b; }; Check.defaultProps = { isChecked: false }; return Check; }(BaseComponent)); export { Check }; //# sourceMappingURL=Check.js.map