UNPKG

react-ionicons

Version:

A React SVG ionicon component

121 lines (93 loc) 6.03 kB
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); var _react = require('react'); var _react2 = _interopRequireDefault(_react); var _propTypes = require('prop-types'); var _propTypes2 = _interopRequireDefault(_propTypes); var _SVG = require('./SVG'); var _SVG2 = _interopRequireDefault(_SVG); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } var IosReverseCameraOutline = function (_Component) { _inherits(IosReverseCameraOutline, _Component); function IosReverseCameraOutline(props) { _classCallCheck(this, IosReverseCameraOutline); var _this = _possibleConstructorReturn(this, (IosReverseCameraOutline.__proto__ || Object.getPrototypeOf(IosReverseCameraOutline)).call(this, props)); _this.state = { classNames: [], animationActive: false }; _this._getClasses = _this._getClasses.bind(_this); return _this; } _createClass(IosReverseCameraOutline, [{ key: 'render', value: function render() { var style = _extends({}, this.props.style, { color: this.props.color, fontSize: this.props.fontSize }); return _react2.default.createElement( _SVG2.default, { style: this.props.style, className: this._getClasses(), fill: this.props.color, width: this.props.fontSize, height: this.props.fontSize, viewBox: '0 0 1024 1024', onClick: this.props.onClick, rotate: this.props.rotate ? 1 : 0, shake: this.props.shake ? 1 : 0, beat: this.props.beat ? 1 : 0 }, _react2.default.createElement('path', { d: 'M603.63 637.216c-26.228 22.058-57.912 34.712-91.63 34.712-72.72 0-132.572-57.93-141.78-123.93h61.22l-77.74-100-75.068 100h58.958c9.392 84 83.434 156 174.41 156 41.8 0 82.34-15.132 114.152-42.436l4.74-4.318-23.198-23.324-4.064 3.296z M631.472 397.77c-32.376-29.55-74.804-45.678-119.472-45.678-41.8 0-82.338 15.112-114.15 42.412l-4.742 4.104 23.198 23.22 4.066-3.412c25.854-21.744 58.394-34.010 91.628-34.010 72.686 0 132.548 57.594 141.782 127.594h-61.288l77.692 102.45 75.252-102.45h-59.024c-4.482-40-23.864-85.872-54.942-114.23z M835 320h-123.45c-64.21-72-84.438-96-109.050-96h-177c-24.628 0-44.334 24-109.042 96h-26.458v-32h-68v32h-27c-35.29 0-67 26.434-67 61.368v352.036c0 34.934 31.71 66.596 67 66.596h640c35.29 0 61-31.662 61-66.598v-352.034c0-34.934-25.71-61.368-61-61.368zM864 733.402c0 18.526-12.458 34.598-29 34.598h-640c-17.476 0-35-17.328-35-34.598v-352.034c0-16.332 16.252-29.368 35-29.368h121.458c0 0 8.248 0 12.266 0s6.45-0.398 11.536-6.4 15.404-20.016 22.16-27.59c22.592-25.332 38.914-43.83 50.632-54.264 9.492-8.45 12.422-7.746 12.45-7.746h177c0.032 0 3.222-0.726 13.418 8.438 12.282 11.042 29.41 33.68 53.116 60.396 5.776 6.51 14.428 16.22 18.634 20.88s8.504 6.286 11.542 6.286 12.34 0 12.34 0h123.448c17.664 0 29 11.93 29 29.368v352.034z' }) ); } }, { key: '_getClasses', value: function _getClasses() { return [].concat(_toConsumableArray(this.state.classNames), [this.props.className]).join(' '); } }, { key: '_getPathByIconName', value: function _getPathByIconName() { var _this2 = this; var icon = icons.find(function (icon) { return icon.tags[0] === _this2.props.icon; }); if (icon) return icon.paths.join(' '); return ''; } }]); return IosReverseCameraOutline; }(_react.Component); IosReverseCameraOutline.defaultProps = { // style style: {}, color: '#000000', fontSize: '22px', // animation shake: false, beat: false, rotate: false }; IosReverseCameraOutline.propTypes = { // style style: _propTypes2.default.object, color: _propTypes2.default.string, fontSize: _propTypes2.default.string, // animation shake: _propTypes2.default.bool, beat: _propTypes2.default.bool, rotate: _propTypes2.default.bool, // functions onClick: _propTypes2.default.func }; exports.default = IosReverseCameraOutline; module.exports = exports['default']; //# sourceMappingURL=IosReverseCameraOutline.js.map