react-flaticons
Version:
A React component library that provides easy access to free vector icons from the Flaticon website.
40 lines • 5.8 kB
JavaScript
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
var _excluded = ["color", "size"];
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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 ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
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, useContext } from 'react';
import PropTypes from 'prop-types';
import IconContext from '../context';
var Bacon = /*#__PURE__*/forwardRef(function (_ref, ref) {
var _ref2, _ref3;
var color = _ref.color,
size = _ref.size,
rest = _objectWithoutProperties(_ref, _excluded);
var iconContext = useContext(IconContext);
var mergedProps = _objectSpread({
color: (_ref2 = color !== null && color !== void 0 ? color : iconContext.color) !== null && _ref2 !== void 0 ? _ref2 : 'currentColor',
size: (_ref3 = size !== null && size !== void 0 ? size : iconContext.size) !== null && _ref3 !== void 0 ? _ref3 : '20px'
}, rest);
return /*#__PURE__*/React.createElement("svg", _extends({
ref: ref,
xmlns: "http://www.w3.org/2000/svg",
width: mergedProps.size,
height: mergedProps.size,
viewBox: "0 0 24 24",
fill: mergedProps.color
}, mergedProps), /*#__PURE__*/React.createElement("path", {
d: "M23.088 4.751 19.153.816A2.764 2.764 0 0 0 14.472 2.3a2.54 2.54 0 0 1-2.186 2.187 3.286 3.286 0 0 0-2.807 2.805 2.542 2.542 0 0 1-2.187 2.187 3.286 3.286 0 0 0-2.806 2.807 2.509 2.509 0 0 1-.721 1.465 2.546 2.546 0 0 1-1.51.727 2.581 2.581 0 0 0-2.108 1.785 2.805 2.805 0 0 0 .668 2.889L4.761 23.1c1.334 1.366 3.25 1.035 4.651-.033a5.619 5.619 0 0 0 2.424-1.243 4.488 4.488 0 0 0 1.291-2.624 1.277 1.277 0 0 1 1.073-1.08 4.546 4.546 0 0 0 3.916-3.915 1.278 1.278 0 0 1 1.084-1.078 4.578 4.578 0 0 0 3.846-3.642 2.945 2.945 0 0 1 .251-.5 3.173 3.173 0 0 0-.209-4.234ZM2.044 16.9a.614.614 0 0 1 .509-.44 4.5 4.5 0 0 0 2.627-1.29 4.491 4.491 0 0 0 1.289-2.63 1.279 1.279 0 0 1 1.077-1.078 4.542 4.542 0 0 0 3.916-3.916 1.279 1.279 0 0 1 1.078-1.077 4.543 4.543 0 0 0 3.918-3.931.75.75 0 0 1 1.282-.307l1.291 1.291c-1.356.881-.918 2.546-1.938 3.585a2.511 2.511 0 0 1-1.466.72 3.286 3.286 0 0 0-2.806 2.807 2.533 2.533 0 0 1-2.188 2.186 3.289 3.289 0 0 0-2.806 2.807 2.506 2.506 0 0 1-.721 1.466c-1.035 1.017-2.706.587-3.584 1.938L2.23 17.739a.822.822 0 0 1-.186-.839Zm19.673-9.141a6.63 6.63 0 0 0-.585 1.14 2.573 2.573 0 0 1-2.189 2.245 3.289 3.289 0 0 0-2.807 2.806 2.539 2.539 0 0 1-2.186 2.187 3.284 3.284 0 0 0-2.806 2.806 2.516 2.516 0 0 1-.722 1.466c-.661.638-1.9.643-2.643 1.31-1.185.936-2.066-.586-2.824-1.255A1.28 1.28 0 0 1 5.9 19.8a4.544 4.544 0 0 0 3.916-3.915 1.278 1.278 0 0 1 1.072-1.085 4.533 4.533 0 0 0 3.917-3.916 1.276 1.276 0 0 1 1.076-1.077A4.547 4.547 0 0 0 19.8 5.9a1.275 1.275 0 0 1 .666-.94c.662.748 2.174 1.627 1.251 2.799Z"
}));
});
Bacon.propTypes = {
color: PropTypes.string,
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
};
Bacon.displayName = 'Bacon';
export default Bacon;