@team-monolith/cds 1.99.5 → 1.99.6
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.
|
@@ -212,7 +212,7 @@ const SIZE_TO_LABEL_STYLE = {
|
|
|
212
212
|
export const Button = React.forwardRef(function Button(props, ref) {
|
|
213
213
|
const { className, component: Component = "button", disabled, color, size, startIcon, endIcon, label, fullWidth, bold = false, loading = false } = props, other = __rest(props, ["className", "component", "disabled", "color", "size", "startIcon", "endIcon", "label", "fullWidth", "bold", "loading"]);
|
|
214
214
|
const theme = useTheme();
|
|
215
|
-
return (_jsxs(Component, Object.assign({ type: "button" }, other, { className: className, ref: ref, css: [
|
|
215
|
+
return (_jsxs(Component, Object.assign({ type: Component === "a" ? undefined : "button" }, other, { className: className, ref: ref, css: [
|
|
216
216
|
css `
|
|
217
217
|
display: inline-flex;
|
|
218
218
|
align-items: center;
|
|
@@ -184,7 +184,7 @@ export const SquareButton = React.forwardRef(function SquareButton(props, ref) {
|
|
|
184
184
|
align-items: center;
|
|
185
185
|
gap: 8px;
|
|
186
186
|
width: ${fullWidth ? "100%" : "fit-content"};
|
|
187
|
-
` }, { children: [_jsx(Component, Object.assign({ type: "button" }, other, buttonProps, { ref: ref, css: [
|
|
187
|
+
` }, { children: [_jsx(Component, Object.assign({ type: Component === "a" ? undefined : "button" }, other, buttonProps, { ref: ref, css: [
|
|
188
188
|
COLOR_TO_BUTTON_STYLE(theme, color, Boolean(disabled || loading)),
|
|
189
189
|
SIZE_TO_BUTTON_STYLE[size],
|
|
190
190
|
css `
|
|
@@ -32,7 +32,7 @@ export const SegmentedControlButton = React.forwardRef(function SegmentedControl
|
|
|
32
32
|
: context.value === props.value;
|
|
33
33
|
const { label } = other;
|
|
34
34
|
return (_jsx(StyledButton, Object.assign({}, other, { ref: ref, startIcon: typeof startIcon === "function" ? startIcon(isActive) : startIcon, endIcon: typeof endIcon === "function" ? endIcon(isActive) : endIcon, isActive: isActive, color: isActive ? "white" : "textNeutral", size: context.size, onClick: handleClick, disabled: context.disabled || props.disabled, title: isActive
|
|
35
|
-
?
|
|
35
|
+
? (typeof label === "string" ? `${label} 선택됨` : "선택됨")
|
|
36
36
|
: undefined })));
|
|
37
37
|
});
|
|
38
38
|
const StyledButton = styled(Button, {
|