@team-monolith/cds 0.15.0 → 0.15.1
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.
|
@@ -52,7 +52,7 @@ var Banner = React.forwardRef(function (props, ref) {
|
|
|
52
52
|
COLOR_TO_STYLE(theme, color),
|
|
53
53
|
fullWidth
|
|
54
54
|
? css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n width: 100%;\n "], ["\n width: 100%;\n "]))) : css(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n border-radius: 12px;\n width: fit-content;\n "], ["\n border-radius: 12px;\n width: fit-content;\n "]))),
|
|
55
|
-
] }, { children: [icon && _jsx(IconDiv, { children: icon }), _jsxs(TextContainer, { children: [headline && _jsx(HeadlineDiv, { children: headline }), content && _jsx("div", { children: content })] }), buttonLabel && (_jsx(BannerButton, __assign({ onClick: onButtonClick }, { children: buttonLabel }))), close && (_jsx(SquareButton, { css: css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n > button,\n > button:hover {\n color: currentColor;\n }\n "], ["\n > button,\n > button:hover {\n color: currentColor;\n }\n "]))), color: "icon", size: "medium", icon: _jsx(CloseFillIcon, {}), onClick: onClose }))] })));
|
|
55
|
+
] }, { children: [icon && _jsx(IconDiv, { children: icon }), _jsxs(TextContainer, { children: [headline && _jsx(HeadlineDiv, { children: headline }), content && _jsx("div", { children: content })] }), buttonLabel && (_jsx(BannerButton, __assign({ type: "button", onClick: onButtonClick }, { children: buttonLabel }))), close && (_jsx(SquareButton, { css: css(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n > button,\n > button:hover {\n color: currentColor;\n }\n "], ["\n > button,\n > button:hover {\n color: currentColor;\n }\n "]))), color: "icon", size: "medium", icon: _jsx(CloseFillIcon, {}), onClick: onClose }))] })));
|
|
56
56
|
});
|
|
57
57
|
var IconDiv = styled.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n padding: 16px 0px 16px 16px;\n"], ["\n display: flex;\n align-items: center;\n padding: 16px 0px 16px 16px;\n"])));
|
|
58
58
|
var HeadlineDiv = styled.div(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n font-weight: 700;\n"], ["\n font-weight: 700;\n"])));
|
|
@@ -55,7 +55,7 @@ var SIZE_TO_LABEL_STYLE = {
|
|
|
55
55
|
*/
|
|
56
56
|
var SquareButton = React.forwardRef(function (props, ref) {
|
|
57
57
|
var className = props.className, _a = props.component, Component = _a === void 0 ? "span" : _a, disabled = props.disabled, color = props.color, size = props.size, icon = props.icon, label = props.label, fullWidth = props.fullWidth, onClick = props.onClick, other = __rest(props, ["className", "component", "disabled", "color", "size", "icon", "label", "fullWidth", "onClick"]);
|
|
58
|
-
return (_jsxs(Component, __assign({}, other, { ref: ref, className: className, css: css(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n\n width: ", ";\n "], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n\n width: ", ";\n "])), fullWidth ? "100%" : "fit-content") }, { children: [_jsx(Button, __assign({ color: color, size: size, disabled: disabled, fullWidth: fullWidth, onClick: onClick }, { children: icon })), label && (_jsx(Label, __assign({ disabled: disabled, size: size }, { children: label })))] })));
|
|
58
|
+
return (_jsxs(Component, __assign({}, other, { ref: ref, className: className, css: css(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n\n width: ", ";\n "], ["\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n\n width: ", ";\n "])), fullWidth ? "100%" : "fit-content") }, { children: [_jsx(Button, __assign({ type: "button", color: color, size: size, disabled: disabled, fullWidth: fullWidth, onClick: onClick }, { children: icon })), label && (_jsx(Label, __assign({ disabled: disabled, size: size }, { children: label })))] })));
|
|
59
59
|
});
|
|
60
60
|
var Button = styled.button(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n border-radius: 8px;\n cursor: pointer;\n &:disabled {\n cursor: default;\n }\n ", "\n ", "\n ", "\n"], ["\n border-radius: 8px;\n cursor: pointer;\n &:disabled {\n cursor: default;\n }\n ", "\n ", "\n ", "\n"])), function (_a) {
|
|
61
61
|
var theme = _a.theme, color = _a.color;
|