UNPKG

iconsax-react

Version:
161 lines (143 loc) 5.94 kB
import { _ as _objectWithoutProperties, a as _extends } from './_rollupPluginBabelHelpers-3bc641ae.js'; import React, { forwardRef } from 'react'; import PropTypes from 'prop-types'; var _excluded = ["variant", "color", "size"]; var Bold = function Bold(_ref) { var color = _ref.color; return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("path", { d: "M22 7.548c0 .66-.54 1.2-1.2 1.2H3.2c-.66 0-1.2-.54-1.2-1.2v-.01c0-2.29 1.85-4.14 4.14-4.14h11.71c2.29 0 4.15 1.86 4.15 4.15ZM2 11.45v5.01c0 2.29 1.85 4.14 4.14 4.14h11.71c2.29 0 4.15-1.86 4.15-4.15v-5c0-.66-.54-1.2-1.2-1.2H3.2c-.66 0-1.2.54-1.2 1.2Zm6 5.8H6c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h2c.41 0 .75.34.75.75s-.34.75-.75.75Zm6.5 0h-4c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h4c.41 0 .75.34.75.75s-.34.75-.75.75Z", fill: color })); }; var Broken = function Broken(_ref2) { var color = _ref2.color; return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("path", { d: "M2 8.5h20M6 16.5h2M10.5 16.5h4", stroke: color, strokeWidth: "1.5", strokeMiterlimit: "10", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/React.createElement("path", { d: "M22 14.99v1.12c0 3.51-.89 4.39-4.44 4.39H6.44C2.89 20.5 2 19.62 2 16.11V7.89c0-3.51.89-4.39 4.44-4.39h11.11c3.56 0 4.45.88 4.45 4.39v3.09", stroke: color, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })); }; var Bulk = function Bulk(_ref3) { var color = _ref3.color; return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("path", { opacity: ".4", d: "M22 9v7.46c0 2.29-1.86 4.14-4.15 4.14H6.15C3.86 20.6 2 18.75 2 16.46V9h20Z", fill: color }), /*#__PURE__*/React.createElement("path", { d: "M22 7.538v1.46H2v-1.46c0-2.29 1.86-4.14 4.15-4.14h11.7c2.29 0 4.15 1.85 4.15 4.14ZM8 17.25H6c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h2c.41 0 .75.34.75.75s-.34.75-.75.75ZM14.5 17.25h-4c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h4c.41 0 .75.34.75.75s-.34.75-.75.75Z", fill: color })); }; var Linear = function Linear(_ref4) { var color = _ref4.color; return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("path", { d: "M2 8.505h20M6 16.505h2M10.5 16.505h4", stroke: color, strokeWidth: "1.5", strokeMiterlimit: "10", strokeLinecap: "round", strokeLinejoin: "round" }), /*#__PURE__*/React.createElement("path", { d: "M6.44 3.505h11.11c3.56 0 4.45.88 4.45 4.39v8.21c0 3.51-.89 4.39-4.44 4.39H6.44c-3.55.01-4.44-.87-4.44-4.38v-8.22c0-3.51.89-4.39 4.44-4.39Z", stroke: color, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })); }; var Outline = function Outline(_ref5) { var color = _ref5.color; return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("path", { d: "M22 9.25H2c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h20c.41 0 .75.34.75.75s-.34.75-.75.75ZM8 17.25H6c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h2c.41 0 .75.34.75.75s-.34.75-.75.75ZM14.5 17.25h-4c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h4c.41 0 .75.34.75.75s-.34.75-.75.75Z", fill: color }), /*#__PURE__*/React.createElement("path", { d: "M17.56 21.25H6.44c-3.98 0-5.19-1.2-5.19-5.14V7.89c0-3.94 1.21-5.14 5.19-5.14h11.11c3.98 0 5.19 1.2 5.19 5.14v8.21c.01 3.95-1.2 5.15-5.18 5.15Zm-11.12-17c-3.14 0-3.69.54-3.69 3.64v8.21c0 3.1.55 3.64 3.69 3.64h11.11c3.14 0 3.69-.54 3.69-3.64V7.89c0-3.1-.55-3.64-3.69-3.64H6.44Z", fill: color })); }; var TwoTone = function TwoTone(_ref6) { var color = _ref6.color; return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("g", { opacity: ".4", stroke: color, strokeWidth: "1.5", strokeMiterlimit: "10", strokeLinecap: "round", strokeLinejoin: "round" }, /*#__PURE__*/React.createElement("path", { d: "M2 8.504h20M6 16.504h2M10.5 16.504h4" })), /*#__PURE__*/React.createElement("path", { d: "M6.44 3.504h11.11c3.56 0 4.45.88 4.45 4.39v8.21c0 3.51-.89 4.39-4.44 4.39H6.44c-3.55.01-4.44-.87-4.44-4.38v-8.22c0-3.51.89-4.39 4.44-4.39Z", stroke: color, strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })); }; var chooseVariant = function chooseVariant(variant, color) { switch (variant) { case 'Bold': return /*#__PURE__*/React.createElement(Bold, { color: color }); case 'Broken': return /*#__PURE__*/React.createElement(Broken, { color: color }); case 'Bulk': return /*#__PURE__*/React.createElement(Bulk, { color: color }); case 'Linear': return /*#__PURE__*/React.createElement(Linear, { color: color }); case 'Outline': return /*#__PURE__*/React.createElement(Outline, { color: color }); case 'TwoTone': return /*#__PURE__*/React.createElement(TwoTone, { color: color }); default: return /*#__PURE__*/React.createElement(Linear, { color: color }); } }; var Card = /*#__PURE__*/forwardRef(function (_ref7, ref) { var variant = _ref7.variant, color = _ref7.color, size = _ref7.size, rest = _objectWithoutProperties(_ref7, _excluded); return /*#__PURE__*/React.createElement("svg", _extends({}, rest, { xmlns: "http://www.w3.org/2000/svg", ref: ref, width: size, height: size, viewBox: "0 0 24 24", fill: "none" }), chooseVariant(variant, color)); }); Card.propTypes = { variant: PropTypes.oneOf(['Linear', 'Bold', 'Broken', 'Bulk', 'Outline', 'TwoTone']), color: PropTypes.string, size: PropTypes.oneOfType([PropTypes.string, PropTypes.number]) }; Card.defaultProps = { variant: 'Linear', color: 'currentColor', size: '24' }; Card.displayName = 'Card'; export { Card as default };