@team-monolith/cds 1.24.1 → 1.25.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.
@@ -17,6 +17,8 @@ export interface ButtonOwnProps<RootComponentType extends React.ElementType> {
17
17
  endIcon?: React.ReactNode;
18
18
  /** 컴포넌트 내 표기될 문자열 */
19
19
  label: React.ReactNode;
20
+ /** 버튼 텍스트 굵음 여부 */
21
+ bold?: boolean;
20
22
  /** 전체 너비 유무 */
21
23
  fullWidth?: boolean;
22
24
  }
@@ -201,7 +201,7 @@ const SIZE_TO_LABEL_STYLE = {
201
201
  * [피그마](https://www.figma.com/file/yhrRFizzmhPoHdw9FbYow2/Codle-PD-Kit---Components?type=design&node-id=20-173&t=cXcCv3QijbX7MkoC-0)
202
202
  */
203
203
  const Button = React.forwardRef(function Button(props, ref) {
204
- const { className, component: Component = "button", disabled, color, size, startIcon, endIcon, label, fullWidth } = props, other = __rest(props, ["className", "component", "disabled", "color", "size", "startIcon", "endIcon", "label", "fullWidth"]);
204
+ const { className, component: Component = "button", disabled, color, size, startIcon, endIcon, label, fullWidth, bold = false } = props, other = __rest(props, ["className", "component", "disabled", "color", "size", "startIcon", "endIcon", "label", "fullWidth", "bold"]);
205
205
  const theme = useTheme();
206
206
  return (_jsxs(Component, Object.assign({ type: "button" }, other, { className: className, ref: ref, css: [
207
207
  css `
@@ -229,10 +229,10 @@ const Button = React.forwardRef(function Button(props, ref) {
229
229
  `,
230
230
  COLOR_TO_BUTTON_STYLE(theme, color, Boolean(disabled)),
231
231
  SIZE_TO_BUTTON_STYLE[size],
232
- ], disabled: disabled }, { children: [startIcon, _jsx(Label, Object.assign({ size: size }, { children: label })), endIcon] })));
232
+ ], disabled: disabled }, { children: [startIcon, _jsx(Label, Object.assign({ size: size, bold: bold }, { children: label })), endIcon] })));
233
233
  });
234
234
  const Label = styled.span `
235
- font-weight: 400;
235
+ font-weight: ${({ bold }) => (bold ? 700 : 400)};
236
236
  white-space: nowrap;
237
237
  ${({ size }) => SIZE_TO_LABEL_STYLE[size]}
238
238
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@team-monolith/cds",
3
- "version": "1.24.1",
3
+ "version": "1.25.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "sideEffects": false,