UNPKG

kwikid-components-react

Version:

KwikID's Component Library in React

52 lines (51 loc) 5.23 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.KwikUIStyleAlertMessage = exports.KwikUIStyleAlertContainer = exports.KwikUIStyleAlertCloseButton = void 0; var _styledComponents = _interopRequireWildcard(require("styled-components")); var _Alert = require("./Alert.definition"); var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject0, _templateObject1, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14; function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); } const KwikUIStyleAlertContainer = exports.KwikUIStyleAlertContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n align-content: center;\n width: 280px;\n border: 2px solid black;\n padding: 0.25rem;\n transition: opacity 0.3s ease-in-out;\n border-radius: 0.5rem;\n box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;\n\n ", "\n\n ", "\n"])), _ref => { let { variant } = _ref; switch (variant) { case _Alert.IKwikUIAlertVariant.SUCCESS: return (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border: 2px solid #28a745;\n background-color: #28a745;\n color: white;\n "]))); case _Alert.IKwikUIAlertVariant.ERROR: return (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n border: 2px solid #dc3545;\n background-color: #dc3545;\n color: white;\n "]))); case _Alert.IKwikUIAlertVariant.WARN: return (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border: 2px solid #ffc107;\n background-color: #ffc107;\n color: white;\n "]))); case _Alert.IKwikUIAlertVariant.INFO: return (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n border: 2px solid #007bff;\n background-color: #007bff;\n color: white;\n "]))); } }, _ref2 => { let { position } = _ref2; switch (position) { case _Alert.IKwikUIAlertPosition.TOP_LEFT: return (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral([""]))); case _Alert.IKwikUIAlertPosition.TOP_CENTER: return (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral([""]))); case _Alert.IKwikUIAlertPosition.TOP_RIGHT: return (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral([""]))); case _Alert.IKwikUIAlertPosition.CENTER_LEFT: return (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral([""]))); case _Alert.IKwikUIAlertPosition.CENTER_CENTER: return (0, _styledComponents.css)(_templateObject0 || (_templateObject0 = _taggedTemplateLiteral([""]))); case _Alert.IKwikUIAlertPosition.CENTER_RIGHT: return (0, _styledComponents.css)(_templateObject1 || (_templateObject1 = _taggedTemplateLiteral([""]))); case _Alert.IKwikUIAlertPosition.BOTTOM_LEFT: return (0, _styledComponents.css)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral([""]))); case _Alert.IKwikUIAlertPosition.BOTTOM_CENTER: return (0, _styledComponents.css)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral([""]))); case _Alert.IKwikUIAlertPosition.BOTTOM_RIGHT: return (0, _styledComponents.css)(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral([""]))); } }); const KwikUIStyleAlertMessage = exports.KwikUIStyleAlertMessage = _styledComponents.default.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n font-size: 1rem;\n padding: 0.5rem;\n"]))); const KwikUIStyleAlertCloseButton = exports.KwikUIStyleAlertCloseButton = _styledComponents.default.button(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n background-color: transparent;\n border: none;\n font-size: 1rem;\n cursor: pointer;\n padding: 0.25rem;\n color: inherit;\n display: flex;\n flex-direction: row;\n align-content: center;\n justify-content: center;\n align-items: center;\n\n &:hover {\n }\n"])));