Skip to content

Commit f911b4f

Browse files
committed
fix: specificity for anchor tag
1 parent 44ec81c commit f911b4f

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/Shared/Components/Button/Button.component.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ const ButtonElement = ({
3737
<Link
3838
{...linkProps}
3939
{...props}
40-
className={`${props.className} ${props.disabled ? 'dc__disable-click' : ''}`}
40+
// Added the specific class to ensure that the link override is applied
41+
className={`${props.className} button__link ${props.disabled ? 'dc__disable-click' : ''}`}
4142
onClick={onClick as LinkProps['onClick']}
4243
/>
4344
)

src/Shared/Components/Button/button.scss

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
color: $text-color;
44
border: 1px solid $border-color;
55

6+
&.button__link {
7+
color: $text-color;
8+
}
9+
610
// Only stroke icons are supposed to be used with button
711
svg,
812
svg * {
@@ -170,7 +174,7 @@
170174
border: none;
171175

172176
&:hover {
173-
text-decoration: underline;
177+
text-decoration: underline !important;
174178
}
175179
}
176180
}
@@ -184,4 +188,10 @@
184188
visibility: hidden;
185189
}
186190
}
191+
192+
&__link {
193+
&:hover {
194+
text-decoration: none;
195+
}
196+
}
187197
}

0 commit comments

Comments
 (0)