UNPKG

@makeen.io/material-ui-kit

Version:
34 lines (30 loc) 2.12 kB
import _extends from "@babel/runtime/helpers/extends";import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";function _templateObject() {var data = _taggedTemplateLiteral(["\n path[fill] {\n fill: ", ";\n }\n"]);_templateObject = function _templateObject() {return data;};return data;}import React from "react"; import { Clear as ClearIcon } from "@material-ui/icons"; import styled from "styled-components"; var icons = {}; function importAll(r) { r.keys().forEach(function (key) { return icons[key.replace("./", "")] = r(key); }); } importAll(require.context("!@svgr/webpack!../../../assets/icons", true, /\.svg$/)); export default styled(function (props) { var defaultSize = props.group && props.group === "thin" ? 40 : 24; var defaultFill = props.group && props.group === "color" ? "" : "gray";var _props$fill = props.fill,fill = _props$fill === void 0 ? defaultFill : _props$fill,group = props.group,_props$height = props.height,height = _props$height === void 0 ? defaultSize : _props$height,name = props.name,_props$width = props.width,width = _props$width === void 0 ? defaultSize : _props$width,_props$viewBox = props.viewBox,viewBox = _props$viewBox === void 0 ? "0 0 ".concat(defaultSize, " ").concat(defaultSize) : _props$viewBox,restProps = _objectWithoutProperties(props, ["fill", "group", "height", "name", "width", "viewBox"]);var _React$useMemo = React.useMemo(function () { var icon = icons["".concat(group ? "".concat(group, "/") : "").concat(name, ".svg")]; if (typeof icon !== "undefined") { return icon; } return { default: function _default() {return /*#__PURE__*/React.createElement(ClearIcon, null);} }; }, [group, name]),Icon = _React$useMemo.default; return /*#__PURE__*/React.createElement(Icon, _extends({ fill: fill, height: height, width: width, viewBox: viewBox }, restProps)); })(_templateObject(), function (_ref) {var fill = _ref.fill;return fill;}); //# sourceMappingURL=index.js.map