Skip to content

Commit 8caae0d

Browse files
committed
Fix: icon viewbox attribute
1 parent 23eab67 commit 8caae0d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/components/Icon/Icon.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ span(:class="className")
1111
:class="styles.Svg",
1212
:focusable="false",
1313
:aria-hidden="true",
14-
:viewBox="mdDown ? '1 1 18 18' : undefined",
14+
v-bind="iconAttrs",
1515
)
1616

1717
div(
@@ -69,7 +69,11 @@ const className = computed(() => classNames(
6969
styles.Icon,
7070
props.tone && styles[variationName('tone', props.tone)],
7171
props.tone && styles.applyColor,
72-
))
72+
));
73+
74+
const iconAttrs = computed(() => {
75+
return mdDown ? { viewBox: '1 1 18 18' } : {};
76+
});
7377
7478
if (
7579
props.tone

0 commit comments

Comments
 (0)