@team-monolith/cds 1.123.1 → 1.124.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.
@@ -14,6 +14,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
14
14
  import { css, useTheme } from "@emotion/react";
15
15
  import styled from "@emotion/styled";
16
16
  import React from "react";
17
+ import { useTranslation } from "react-i18next";
17
18
  import { CloseFillIcon } from "../icons";
18
19
  import { SquareButton } from "./SquareButton";
19
20
  import { Button } from "./Button";
@@ -60,6 +61,7 @@ export const Banner = React.forwardRef(function Banner(props, ref) {
60
61
  var _a;
61
62
  const { className, component: Component = "div", headline, content, icon, color, buttonLabel, onButtonClick, buttonProps, close, onClose, fullWidth } = props, other = __rest(props, ["className", "component", "headline", "content", "icon", "color", "buttonLabel", "onButtonClick", "buttonProps", "close", "onClose", "fullWidth"]);
62
63
  const theme = useTheme();
64
+ const { t } = useTranslation();
63
65
  return (_jsxs(Component, Object.assign({}, other, { ref: ref, className: [bannerClasses.root, className].filter(Boolean).join(" "), css: [
64
66
  css `
65
67
  display: flex;
@@ -90,7 +92,7 @@ export const Banner = React.forwardRef(function Banner(props, ref) {
90
92
  // component 속성이 없는 경우 제네릭 인자로 전달되는 타입을 확인하지 못하므로 component 속성 명시
91
93
  component: (_a = buttonProps === null || buttonProps === void 0 ? void 0 : buttonProps.component) !== null && _a !== void 0 ? _a : "button" }))), close && (_jsx(SquareButton, { className: bannerClasses.closeSquareButton, css: css `
92
94
  color: ${COLOR_PALETTE(theme, color).content};
93
- `, color: "icon", size: "small", icon: _jsx(CloseFillIcon, {}), onClick: onClose, "aria-label": "\uB2EB\uAE30" }))] })));
95
+ `, color: "icon", size: "small", icon: _jsx(CloseFillIcon, {}), onClick: onClose, "aria-label": t("닫기", { context: "배너" }) }))] })));
94
96
  });
95
97
  const Icon = styled.div `
96
98
  display: flex;
@@ -145,8 +145,7 @@ const COLOR_TO_BUTTON_STYLE = (theme, color, disabled) => ({
145
145
  const SIZE_TO_BUTTON_STYLE = {
146
146
  large: css `
147
147
  min-width: 100px;
148
- height: 56px;
149
- padding: 0 20px;
148
+ padding: 16px 20px;
150
149
  gap: 10px;
151
150
  border-radius: 12px;
152
151
 
@@ -157,8 +156,7 @@ const SIZE_TO_BUTTON_STYLE = {
157
156
  `,
158
157
  medium: css `
159
158
  min-width: 82px;
160
- height: 48px;
161
- padding: 0 16px;
159
+ padding: 14px 16px;
162
160
  gap: 8px;
163
161
  border-radius: 10px;
164
162
 
@@ -169,8 +167,7 @@ const SIZE_TO_BUTTON_STYLE = {
169
167
  `,
170
168
  small: css `
171
169
  min-width: 64px;
172
- height: 36px;
173
- padding: 0 12px;
170
+ padding: 10px 12px;
174
171
  gap: 8px;
175
172
  border-radius: 8px;
176
173
 
@@ -181,8 +178,7 @@ const SIZE_TO_BUTTON_STYLE = {
181
178
  `,
182
179
  xsmall: css `
183
180
  min-width: 52px;
184
- height: 28px;
185
- padding: 0 8px;
181
+ padding: 6px 8px;
186
182
  gap: 4px;
187
183
  border-radius: 6px;
188
184
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@team-monolith/cds",
3
- "version": "1.123.1",
3
+ "version": "1.124.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "sideEffects": false,