Skip to content

Commit 0f4e2a1

Browse files
author
jvictordev1
committed
refactor: aplica estilos base aos itens do breadcrumb quando a variant for inválida
1 parent 6a18557 commit 0f4e2a1

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

src/components/Breadcrumb.vue

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
>
1313
<router-link
1414
:to="routerPushTo(item)"
15-
:class="`breadcrumb__link--${variant}`"
15+
:class="`breadcrumb__link breadcrumb__link--${variant}`"
1616
>
1717
<CdsIcon
1818
v-if="items.length <= 2"
@@ -49,7 +49,7 @@
4949

5050
<router-link
5151
:to="routerPushTo(item)"
52-
:class="`breadcrumb__link--${variant}`"
52+
:class="`breadcrumb__link breadcrumb__link--${variant}`"
5353
>
5454
<CdsClickable :clickable="index !== items.length - 1">
5555
{{ item.label }}
@@ -104,6 +104,7 @@ function routerPushTo(item) {
104104
@use '../assets/sass/tokens/index' as tokens;
105105
106106
.breadcrumb {
107+
@include tokens.caption;
107108
display: flex;
108109
align-items: center;
109110
padding: tokens.pa(0);
@@ -113,6 +114,12 @@ function routerPushTo(item) {
113114
}
114115
115116
&__link {
117+
@extend .breadcrumb;
118+
border-radius: tokens.$border-radius-lil;
119+
padding: tokens.pa(1);
120+
transition: tokens.$hover;
121+
color: tokens.$n-600;
122+
116123
@include tokens.variantResolver using (
117124
$color-name,
118125
$shade-50,
@@ -123,14 +130,6 @@ function routerPushTo(item) {
123130
$shade-500,
124131
$shade-600
125132
) {
126-
@extend .breadcrumb;
127-
@include tokens.caption;
128-
129-
border-radius: tokens.$border-radius-lil;
130-
padding: tokens.pa(1);
131-
transition: tokens.$hover;
132-
color: tokens.$n-600;
133-
134133
&:hover,
135134
&:hover svg {
136135
background-color: $shade-50;

0 commit comments

Comments
 (0)