krl-alfred 1.32.0 → 1.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -18,11 +18,11 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
18
18
|
var Alert_styled_1 = require("./Alert.styled");
|
|
19
19
|
var Icon_1 = __importDefault(require("../Icon/Icon"));
|
|
20
20
|
var Alert = function (props) {
|
|
21
|
-
return props.show && (0, jsx_runtime_1.jsxs)(Alert_styled_1.AlertStyled, __assign({}, props, { children: [(0, jsx_runtime_1.jsx)("div", { className: "left", children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "Danger" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "right", children: [(0, jsx_runtime_1.jsx)("h1", { className: "title-semi-bold-16-19", children: props.title }), (0, jsx_runtime_1.jsx)("p", { className: "body-medium-14-17", children:
|
|
21
|
+
return props.show && (0, jsx_runtime_1.jsxs)(Alert_styled_1.AlertStyled, __assign({}, props, { children: [(0, jsx_runtime_1.jsx)("div", { className: "left", children: (0, jsx_runtime_1.jsx)(Icon_1.default, { name: "Danger" }) }), (0, jsx_runtime_1.jsxs)("div", { className: "right", children: [(0, jsx_runtime_1.jsx)("h1", { className: "title-semi-bold-16-19", children: props.title }), props.messages.map(function (message, index) { return (0, jsx_runtime_1.jsx)("p", { className: "body-medium-14-17", children: message }, index); })] })] }));
|
|
22
22
|
};
|
|
23
23
|
Alert.defaultProps = {
|
|
24
24
|
title: "Bir hata oluştu",
|
|
25
|
-
|
|
25
|
+
messages: [],
|
|
26
26
|
show: false
|
|
27
27
|
};
|
|
28
28
|
exports.default = Alert;
|
|
@@ -9,5 +9,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
9
9
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
10
|
exports.AlertStyled = void 0;
|
|
11
11
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
-
exports.AlertStyled = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-radius: 8px;\n border-left: 8px solid var(--yellow);\n box-shadow: 0 6px 30px 0 #EAE9F0;\n width: ", ";\n display: flex;\n padding: 16px 16px 16px 24px;\n box-sizing: border-box;\n .left {\n padding-right: 16px;\n }\n .right {\n display: flex;\n flex-direction: column;\n color: var(--dark);\n h1 {\n margin: 0 0 8px;\n }\n p {\n margin: 0;\n }\n }\n"], ["\n border-radius: 8px;\n border-left: 8px solid var(--yellow);\n box-shadow: 0 6px 30px 0 #EAE9F0;\n width: ", ";\n display: flex;\n padding: 16px 16px 16px 24px;\n box-sizing: border-box;\n .left {\n padding-right: 16px;\n }\n .right {\n display: flex;\n flex-direction: column;\n color: var(--dark);\n h1 {\n margin: 0 0 8px;\n }\n p {\n margin: 0;\n }\n }\n"])), function (props) { return props.width || "100%"; });
|
|
12
|
+
exports.AlertStyled = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-radius: 8px;\n border-left: 8px solid var(--yellow);\n box-shadow: 0 6px 30px 0 #EAE9F0;\n width: ", ";\n display: flex;\n padding: 16px 16px 16px 24px;\n box-sizing: border-box;\n\n .left {\n padding-right: 16px;\n }\n\n .right {\n display: flex;\n flex-direction: column;\n color: var(--dark);\n\n h1 {\n margin: 0 0 8px;\n padding-top: 2px;\n }\n\n p {\n margin: 0;\n\n &:not(:last-child) {\n margin-bottom: 8px;\n }\n }\n }\n"], ["\n border-radius: 8px;\n border-left: 8px solid var(--yellow);\n box-shadow: 0 6px 30px 0 #EAE9F0;\n width: ", ";\n display: flex;\n padding: 16px 16px 16px 24px;\n box-sizing: border-box;\n\n .left {\n padding-right: 16px;\n }\n\n .right {\n display: flex;\n flex-direction: column;\n color: var(--dark);\n\n h1 {\n margin: 0 0 8px;\n padding-top: 2px;\n }\n\n p {\n margin: 0;\n\n &:not(:last-child) {\n margin-bottom: 8px;\n }\n }\n }\n"])), function (props) { return props.width || "100%"; });
|
|
13
13
|
var templateObject_1;
|
|
@@ -6,11 +6,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.Default = void 0;
|
|
7
7
|
var Alert_1 = __importDefault(require("../Alert"));
|
|
8
8
|
exports.default = {
|
|
9
|
-
title: 'Alert',
|
|
9
|
+
title: 'Components/Alert',
|
|
10
10
|
component: Alert_1.default,
|
|
11
11
|
tags: ['autodocs'],
|
|
12
12
|
argTypes: {}
|
|
13
13
|
};
|
|
14
14
|
exports.Default = {
|
|
15
|
-
args: {
|
|
15
|
+
args: {
|
|
16
|
+
width: "327px",
|
|
17
|
+
show: true,
|
|
18
|
+
messages: ["Alert message"]
|
|
19
|
+
},
|
|
16
20
|
};
|