UNPKG

@icons-pack/react-simple-icons

Version:

This package provides the Simple Icons packaged as a set of React components.

43 lines (38 loc) 2.27 kB
function _extends() { _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; }; return _extends.apply(this, arguments); } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } import React, { forwardRef } from 'react'; import PropTypes from 'prop-types'; var Caterpillar = /*#__PURE__*/forwardRef(function Caterpillar(_ref, ref) { var _ref$color = _ref.color, color = _ref$color === void 0 ? 'currentColor' : _ref$color, _ref$size = _ref.size, size = _ref$size === void 0 ? 24 : _ref$size, _ref$title = _ref.title, title = _ref$title === void 0 ? 'caterpillar' : _ref$title, others = _objectWithoutPropertiesLoose(_ref, ["color", "size", "title"]); return /*#__PURE__*/React.createElement("svg", _extends({ xmlns: "http://www.w3.org/2000/svg", width: size, height: size, fill: color, viewBox: "0 0 24 24", ref: ref }, others), /*#__PURE__*/React.createElement("title", null, title), /*#__PURE__*/React.createElement("path", { d: "M11.901 11.554l.802-4.1.798 4.1zm2.869-6.52h-4.15L8.2 15.884l4.503-3.635 4.695 3.934zm-2.067 8.156l-7.509 6.072H19.95zM24 5.02v2.77h-2.066v11.45h-.882l-2.436-2.04V7.79h-2.057V5.02zM6.872 16.864c.548-.458.642-1.024.642-1.532V13.2h-2.98v2.894a.75.75 0 0 1-.748.751c-.414 0-.722-.336-.722-.75V7.893c0-.414.308-.75.722-.75a.75.75 0 0 1 .749.75v2.913H7.51V7.785c0-1.67-1.092-3.044-3.75-3.047-2.728 0-3.76 1.38-3.76 3.05v8.563c0 1.655 1.314 2.907 2.995 2.907h.922Z" })); }); Caterpillar.propTypes = { /** * Hex color or color name */ color: PropTypes.string, /** * The size of the Icon. */ size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), /** * The title provides an accessible short text description to the SVG */ title: PropTypes.string }; export default Caterpillar;