UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

29 lines (28 loc) 1.38 kB
var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; define(["require", "exports", 'react', '../../utilities/css', './Check.scss'], function (require, exports, React, css_1) { "use strict"; var Check = (function (_super) { __extends(Check, _super); function Check() { _super.apply(this, arguments); } Check.prototype.shouldComponentUpdate = function (newProps) { return this.props.isChecked !== newProps.isChecked; }; Check.prototype.render = function () { var isChecked = this.props.isChecked; return (React.createElement("svg", {focusable: 'false', className: css_1.css('ms-Check', { 'is-checked': isChecked }), height: '20', width: '20'}, React.createElement("circle", {className: 'ms-Check-circle', cx: '10', cy: '10', r: '9', strokeWidth: '1'}), React.createElement("polyline", {className: 'ms-Check-check', points: '6.3,10.3 9,13 13.3,7.5', strokeWidth: '1.5', fill: 'none'}))); }; Check.defaultProps = { isChecked: false }; return Check; }(React.Component)); exports.Check = Check; });