File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ <template >
2+ <a
3+ :href =" href"
4+ :target =" target"
5+ class =" m-link"
6+ :class =" reversedUnderlineClass"
7+ >
8+ {{ label }}
9+ <slot name =" icon" >
10+ <muc-icon
11+ v-if =" icon"
12+ :icon =" icon"
13+ class =" icon icon--after"
14+ />
15+ </slot >
16+ </a >
17+ </template >
18+
19+ <script setup lang="ts">
20+ import { computed } from " vue" ;
21+
22+ import { MucIcon } from " ../Icon" ;
23+
24+ const props = withDefaults (
25+ defineProps <{
26+ label: string ;
27+ href? : string ;
28+ icon? : string ;
29+ target? : string ;
30+ noUnderline? : boolean ;
31+ }>(),
32+ {
33+ noUnderline: false ,
34+ href: " #" ,
35+ target: " _blank" ,
36+ }
37+ );
38+
39+ const reversedUnderlineClass = computed (() =>
40+ props .noUnderline ? " m-link--reversed-underline" : " "
41+ );
42+ </script >
43+
44+ <style scoped></style >
You can’t perform that action at this time.
0 commit comments