Skip to content

Commit f1b2c22

Browse files
committed
Enhance Button component loading state styling by adjusting opacity based on style type
1 parent 1130d92 commit f1b2c22

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/components/Button/Button.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,16 @@ const StyledButton = styled(BaseButton)<{
187187
}}
188188
189189
/* Loading state styling */
190-
${({ $loading }) => {
190+
${({ $loading, $styleType }) => {
191191
if (!$loading) {
192192
return "";
193193
}
194194
195+
const btnOpacity = $styleType === "empty" ? 0.9 : 0.7;
196+
195197
return css`
196198
cursor: not-allowed;
197-
opacity: 0.7;
199+
opacity: ${btnOpacity};
198200
199201
/* Dim text and icons */
200202
> * {

0 commit comments

Comments
 (0)