UNPKG

@vtex/styleguide

Version:

> VTEX Styleguide React components ([Docs](https://vtex.github.io/styleguide))

72 lines (56 loc) 1.89 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _react = require("react"); var _react2 = _interopRequireDefault(_react); var _propTypes = require("prop-types"); var _propTypes2 = _interopRequireDefault(_propTypes); var _IconBase = require("../IconBase"); var _utils = require("../utils"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } var iconBase = { width: 16, height: 16 }; var Clock = /*#__PURE__*/ function (_PureComponent) { _inheritsLoose(Clock, _PureComponent); function Clock() { return _PureComponent.apply(this, arguments) || this; } var _proto = Clock.prototype; _proto.render = function render() { var _this$props = this.props, color = _this$props.color, size = _this$props.size, block = _this$props.block; var newSize = (0, _utils.calcIconSize)(iconBase, size); return _react2.default.createElement(_IconBase.Svg, { name: "clock", size: newSize, block: block }, _react2.default.createElement("path", { d: "M8 0C3.6 0 0 3.6 0 8C0 12.4 3.6 16 8 16C12.4 16 16 12.4 16 8C16 3.6 12.4 0 8 0ZM8 14C4.7 14 2 11.3 2 8C2 4.7 4.7 2 8 2C11.3 2 14 4.7 14 8C14 11.3 11.3 14 8 14Z", fill: color }), _react2.default.createElement("path", { d: "M2 0H0V5H5V3H2V0Z", transform: "translate(7 4)", fill: color })); }; return Clock; }(_react.PureComponent); Clock.defaultProps = { color: 'currentColor', size: 16, block: false }; Clock.propTypes = { color: _propTypes2.default.string, size: _propTypes2.default.number, block: _propTypes2.default.bool }; exports.default = Clock;