react-ionicons
Version:
A React SVG ionicon component
82 lines (67 loc) • 2.23 kB
JavaScript
'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 _SvgContainer = require('./SvgContainer');
var _SvgContainer2 = _interopRequireDefault(_SvgContainer);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var Cube = function Cube(props) {
return _react2.default.createElement(
_SvgContainer2.default,
{
height: props.height,
width: props.width,
color: props.color,
onClick: props.onClick,
rotate: props.rotate ? 1 : 0,
shake: props.shake ? 1 : 0,
beat: props.beat ? 1 : 0,
className: props.className
},
_react2.default.createElement(
'svg',
{ style: props.style, className: props.cssClasses, xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 512 512' },
props.title ? _react2.default.createElement(
'title',
null,
props.title
) : '',
_react2.default.createElement('path', { d: 'M440.9 136.3a4 4 0 000-6.91L288.16 40.65a64.14 64.14 0 00-64.33 0L71.12 129.39a4 4 0 000 6.91L254 243.88a4 4 0 004.06 0zM54 163.51a4 4 0 00-6 3.49v173.89a48 48 0 0023.84 41.39L234 479.51a4 4 0 006-3.46V274.3a4 4 0 00-2-3.46zM272 275v201a4 4 0 006 3.46l162.15-97.23A48 48 0 00464 340.89V167a4 4 0 00-6-3.45l-184 108a4 4 0 00-2 3.45z' })
)
);
};
Cube.defaultProps = {
// style
style: {},
color: '#000000',
height: '22px',
width: '22px',
cssClasses: '',
title: '',
// animation
shake: false,
beat: false,
rotate: false
};
Cube.propTypes = {
// style
style: _propTypes2.default.object,
color: _propTypes2.default.string,
height: _propTypes2.default.string,
width: _propTypes2.default.string,
cssClasses: _propTypes2.default.string,
title: _propTypes2.default.string,
// animation
shake: _propTypes2.default.bool,
beat: _propTypes2.default.bool,
rotate: _propTypes2.default.bool,
// functions
onClick: _propTypes2.default.func
};
exports.default = Cube;
module.exports = exports['default'];
//# sourceMappingURL=Cube.js.map