@icons-pack/react-simple-icons
Version:
This package provides the Simple Icons packaged as a set of React components.
43 lines (38 loc) • 2.37 kB
JavaScript
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 Fontawesome = /*#__PURE__*/forwardRef(function Fontawesome(_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 ? 'fontawesome' : _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: "M2.571 0A2.572 2.572 0 000 2.571V21.43A2.572 2.572 0 002.571 24H21.43A2.572 2.572 0 0024 21.429V2.57A2.572 2.572 0 0021.429 0zm4.324 4c.993 0 1.793.8 1.793 1.791A1.7 1.7 0 017.984 7.2v.993c.128-.043 1.836-.897 3.584-.897 2.04 0 3.053.865 3.968.865 1.217 0 2.56-.865 2.88-.865.257 0 .48.192.48.416v7.521c0 .224-.191.32-.415.416-.896.384-1.857.736-2.88.736-1.44 0-2.113-.896-3.841-.896-1.248 0-2.56.448-3.616.929-.064.032-.129.032-.193.064v2.432c0 .669-.503 1.088-1.056 1.088a1.08 1.08 0 01-1.088-1.088V7.199a1.789 1.789 0 01-.704-1.408C5.103 4.8 5.903 4 6.895 4Z"
}));
});
Fontawesome.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 Fontawesome;