UNPKG

hh-ui-components

Version:
21 lines 2.34 kB
import React from "react"; import classNames from "classnames"; export var Alert = function (_a) { var label = _a.label, className = _a.className, variants = _a.variants, onClick = _a.onClick; var classes = classNames({ "py-[5px] 2xl:py-[0.347vw] px-[15px] 2xl:px-[1.042vw] rounded 2xl:rounded-[0.278vw] flex items-center text-body-large 2xl:text-body-large-2xl capitalize": true, "bg-red text-white w-fit": variants === "error", "bg-green text-graphite w-fit": variants === "success" }); return (React.createElement("div", { className: "".concat(classes, " ").concat(className), onClick: onClick }, variants === "error" ? (React.createElement(React.Fragment, null, React.createElement("svg", { className: "mr-10 2xl:mr-10-2xl h-[0.875rem] w-[0.875rem] md:h-[1.823vw] md:w-[1.823vw] lg:h-[0.875rem] lg:w-[0.875rem] 2xl:h-[0.972vw] 2xl:w-[0.972vw]", width: "100%", height: "100%", viewBox: "0 0 15 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", role: "img", "aria-labelledby": "error-icon" }, React.createElement("path", { d: "M0.599609 7C0.599609 3.13401 3.73362 0 7.59961 0C11.4656 0 14.5996 3.13401 14.5996 7C14.5996 10.866 11.4656 14 7.59961 14C3.73362 14 0.599609 10.866 0.599609 7Z", fill: "#ffffff" }), React.createElement("path", { d: "M7.59961 2V8", stroke: "#EC0000", strokeWidth: "2" }), React.createElement("circle", { cx: "7.59961", cy: "10.5", r: "0.5", fill: "#EC0000", stroke: "#EC0000" })))) : variants === "success" ? (React.createElement(React.Fragment, null, React.createElement("svg", { className: "mr-10 2xl:mr-10-2xl h-[1.25rem] w-[1.25rem] md:h-[2.604vw] md:w-[2.604vw] lg:h-[1.25rem] lg:w-[1.25rem] 2xl:h-[1.389vw] 2xl:w-[1.389vw]", width: "100%", height: "100%", viewBox: "0 0 15 14", fill: "none", role: "img", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": "Success" }, React.createElement("path", { d: "M0.5 7C0.5 3.13401 3.63401 0 7.5 0V0C11.366 0 14.5 3.13401 14.5 7V7C14.5 10.866 11.366 14 7.5 14V14C3.63401 14 0.5 10.866 0.5 7V7Z", fill: "black" }), React.createElement("path", { d: "M3.4165 7.25374L6.01182 9.84906L11.5832 4.27771", stroke: "white", strokeWidth: "2" })))) : null, label)); }; //# sourceMappingURL=Alert.js.map