@@ -67,26 +67,24 @@ interface ButtonProps {
6767}
6868
6969const ButtonGroupWrapper = styled . div < { $fillWidth ?: boolean ; $type ?: ButtonGroupType } > `
70- box-sizing: border-box;
7170 display: inline-flex;
71+ box-sizing: border-box;
7272 flex-direction: row;
7373 justify-content: center;
7474 align-items: center;
75- padding: 0px;
76- gap: ${ ( { theme, $type = "default" } ) => theme . click . button . group . space . gap [ $type ] } ;
77- border: 1px solid
78- ${ ( { theme, $type = "default" } ) =>
79- theme . click . button . group . color . panel . stroke [ $type ] } ;
75+ padding: ${ ( { theme, $type = "default" } ) =>
76+ `${ theme . click . button . group . space . panel [ $type ] . x } ${ theme . click . button . group . space . panel [ $type ] . y } ` } ;
77+ gap: ${ ( { theme, $type = "default" } ) =>
78+ theme . click . button . group . space . panel [ $type ] . gap } ;
79+ border: ${ ( { theme, $type = "default" } ) =>
80+ $type === "default"
81+ ? `1px solid ${ theme . click . button . group . color . panel . stroke [ $type ] } `
82+ : "none" } ;
8083 background: ${ ( { theme } ) => theme . click . button . group . color . background . panel } ;
81- border-radius: ${ ( { theme } ) => theme . click . button . group . radii . all } ;
84+ border-radius: ${ ( { theme } ) => theme . click . button . group . radii . panel . all } ;
8285 width: ${ ( { $fillWidth } ) => ( $fillWidth ? "100%" : "auto" ) } ;
8386` ;
8487
85- const endRadii = "var(--click-button-button-group-radii-end)" ;
86- const leftBorderRadius = `${ endRadii } 0px 0px ${ endRadii } ` ;
87- const rightBorderRadius = `0px ${ endRadii } ${ endRadii } 0px` ;
88- const centerBorderRadius = "var(--click-button-button-group-radii-center)" ;
89-
9088const Button = styled . button . attrs < ButtonProps > ( ( props : ButtonProps ) => ( {
9189 "aria-pressed" : props . $active ,
9290} ) ) `
@@ -95,18 +93,19 @@ const Button = styled.button.attrs<ButtonProps>((props: ButtonProps) => ({
9593 flex-direction: row;
9694 justify-content: center;
9795 align-items: center;
98- border: none;
9996 background: ${ ( { $active, theme } : ButtonProps ) =>
10097 $active
10198 ? theme . click . button . group . color . background . active
10299 : theme . click . button . group . color . background . default } ;
103100 color: ${ ( { theme } ) => theme . click . button . group . color . text . default } ;
104101 font: ${ ( { theme } ) => theme . click . button . group . typography . label . default } ;
105- padding: ${ ( { theme } ) => theme . click . button . basic . space . y }
106- ${ ( { theme } ) => theme . click . button . basic . space . x } ;
107- gap: ${ ( { theme } ) => theme . click . button . basic . space . group } ;
102+ padding: ${ ( { theme, $type = "default" } ) =>
103+ `${ theme . click . button . group . space . button [ $type ] . y } ${ theme . click . button . group . space . button [ $type ] . x } ` } ;
108104 ${ ( { $fillWidth = false } ) => ( $fillWidth ? "flex: 1;" : "" ) } ;
105+ border-radius: ${ ( { theme, $type = "default" } ) =>
106+ theme . click . button . group . radii . button [ $type ] . all } ;
109107 cursor: pointer;
108+ border: none;
110109
111110 &:hover {
112111 background: ${ ( { theme } ) => theme . click . button . group . color . background . hover } ;
@@ -141,13 +140,4 @@ const Button = styled.button.attrs<ButtonProps>((props: ButtonProps) => ({
141140 theme . click . button . group . color . background [ "disabled-active" ] } ;
142141 }
143142 }
144-
145- border-radius: ${ ( { theme, $type, $position } : ButtonProps ) =>
146- $type === "borderless"
147- ? theme . click . button . group . radii . all
148- : $position === "left"
149- ? leftBorderRadius
150- : $position === "right"
151- ? rightBorderRadius
152- : centerBorderRadius } ;
153143` ;
0 commit comments