@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.
|
@@ -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
|
`;
|