@makeen.io/material-ui-kit
Version:
Makeen UI components kit. Based on material-ui.
45 lines (25 loc) • 2.08 kB
JavaScript
import _extends from "@babel/runtime/helpers/extends";import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";function _templateObject() {var data = _taggedTemplateLiteral(["\n border-radius: 14px;\n padding: ", ";\n text-align: center;\n font-size: 11px;\n color: ", ";\n background: ", ";\n border: ", ";\n ", "\n\n ", "\n\n ", "\n\n .tagCloseCircle {\n transform: ", ";\n position: relative;\n top: ", ";\n path:nth-child(2) {\n fill: ", " !important;\n }\n }\n"]);_templateObject = function _templateObject() {return data;};return data;}import React from "react";
import CloseCircle from "../../../assets/icons/close-circle.svg";
import styled from "styled-components";
var ExplorerTagWrapper = styled.span(_templateObject(),
function (props) {return props.withCloseBtn ? "5px 0px 5px 10px" : "5px 10px";},
function (props) {return props.theme.palette.TagColors[props.palette].color;},
function (props) {return props.isFilled ?
props.theme.palette.TagColors[props.palette].backgroundColor :
"transparent";},
function (props) {return !props.isFilled ? "1px solid ".concat(
props.theme.palette.TagColors[props.palette].backgroundColor) :
"0px";},
function (props) {return props.tagStyle ? props.tagStyle(props) : "";},
function (props) {return props.size === "small" &&
props.withCloseBtn && "\n font-size: 11px;\n padding: 4px 0 4px 8px;\n ";},
function (props) {return props.size === "medium" && "\n font-size: 15px;\n min-width: 70px;\n ";},
function (props) {return props.size === "medium" ? "scale(0.6)" : "scale(0.5)";},
function (props) {return props.size === "medium" ? "7px" : "8px";},
function (props) {return props.theme.palette.TagColors[props.palette].color;});
export default (function (props) {
return /*#__PURE__*/React.createElement(ExplorerTagWrapper, _extends({ className: "explorer-tag" }, props),
props.label,
props.withCloseBtn ? /*#__PURE__*/React.createElement(CloseCircle, { className: "tagCloseCircle" }) : "");
});
//# sourceMappingURL=index.js.map