File tree Expand file tree Collapse file tree 9 files changed +165
-7
lines changed Expand file tree Collapse file tree 9 files changed +165
-7
lines changed Original file line number Diff line number Diff line change 2424 "./dist/style.css" : " ./dist/style.css" ,
2525 "./dist/assets/temporary/custom-style.css" : " ./dist/assets/temporary/custom-style.css" ,
2626 "./dist/assets/temporary/muenchende-style.css" : " ./dist/assets/temporary/muenchende-style.css" ,
27- "./dist/assets/temporary/muenchende-fontface .css" : " ./dist/assets/temporary/muenchende-fontface .css" ,
27+ "./dist/assets/temporary/muenchende-fontfaces .css" : " ./dist/assets/temporary/muenchende-fontfaces .css" ,
2828 "./dist/assets/temporary/muc-icons.svg" : " ./dist/assets/temporary/muc-icons.svg" ,
2929 "./dist/assets/temporary/custom-icons.svg" : " ./dist/assets/temporary/custom-icons.svg"
3030 },
Original file line number Diff line number Diff line change 1+ import MucDivider from "./MucDivider.vue" ;
2+
3+ export default {
4+ component : MucDivider ,
5+ title : "MucDivider" ,
6+ tags : [ "autodocs" ] ,
7+ parameters : {
8+ docs : {
9+ description : {
10+ component : `The \`muc-divider\` is a trivial divider.
11+
12+ [🔗 Patternlab-Docs](https://patternlab.muenchen.space/?p=viewall-components-all)
13+ ` ,
14+ } ,
15+ } ,
16+ } ,
17+ } ;
18+
19+ export const Default = { } ;
Original file line number Diff line number Diff line change 1+ <template >
2+ <hr class =" divider-border" />
3+ </template >
4+
5+ <style scoped>
6+ .divider-border {
7+ border-bottom : 1px solid var (--color-neutrals-blue );
8+ }
9+ </style >
Original file line number Diff line number Diff line change 1+ import MucDivider from "./MucDivider.vue" ;
2+
3+ export { MucDivider } ;
Original file line number Diff line number Diff line change 1+ import { fn } from "@storybook/test" ;
2+
3+ import MucLink from "./MucLink.vue" ;
4+
5+ export default {
6+ component : MucLink ,
7+ title : "MucLink" ,
8+ tags : [ "autodocs" ] ,
9+ // 👇 Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked
10+ args : { onClick : fn ( ) } ,
11+ parameters : {
12+ docs : {
13+ description : {
14+ component : `The \`muc-link\` component is a wrapper commponent for a standard html-a tag.
15+
16+ [🔗 Patternlab-Docs](https://patternlab.muenchen.space/?p=viewall-elements-links)
17+ ` ,
18+ } ,
19+ } ,
20+ } ,
21+ } ;
22+
23+ export const Weather = {
24+ args : {
25+ label : "Generic link label" ,
26+ } ,
27+ } ;
28+
29+ export const LinkWithIcon = {
30+ args : {
31+ icon : "youtube" ,
32+ label : "youtube" ,
33+ href : "https://www.youtube.com" ,
34+ noUnderline : true ,
35+ } ,
36+ } ;
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+ /**
27+ * Text shown as the link
28+ */
29+ label: string ;
30+
31+ /**
32+ * href to link to
33+ */
34+ href? : string ;
35+
36+ /**
37+ * Optional icon displayed behind the text
38+ */
39+ icon? : string ;
40+
41+ /**
42+ * Target on the link
43+ */
44+ target? : string ;
45+
46+ /**
47+ * Removes the underline from the label text
48+ */
49+ noUnderline? : boolean ;
50+ }>(),
51+ {
52+ noUnderline: false ,
53+ href: " #" ,
54+ target: " _blank" ,
55+ }
56+ );
57+
58+ defineSlots <{
59+ /**
60+ * Icon slots overrides chosen prop icon.
61+ * The icon can be displayed infront or behind the label with these classes: icon--after | icon--before
62+ */
63+ icon(): void ;
64+ }>();
65+
66+ /**
67+ * Computed class to remove the underline if chosen.
68+ */
69+ const reversedUnderlineClass = computed (() =>
70+ props .noUnderline ? " m-link--reversed-underline" : " "
71+ );
72+ </script >
73+
74+ <style scoped></style >
Original file line number Diff line number Diff line change 1+ import MucLink from "./MucLink.vue" ;
2+
3+ export { MucLink } ;
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { MucButton } from "./Button";
33import { MucCallout } from "./Callout" ;
44import { MucCard , MucCardContainer } from "./Card" ;
55import { MucComment , MucCommentText } from "./Comment/" ;
6+ import { MucDivider } from "./Divider" ;
67import {
78 MucCheckbox ,
89 MucCheckboxGroup ,
@@ -15,6 +16,7 @@ import {
1516} from "./Form" ;
1617import { MucIcon } from "./Icon" ;
1718import { MucIntro } from "./Intro" ;
19+ import { MucLink } from "./Link" ;
1820
1921export {
2022 MucButton ,
@@ -34,4 +36,6 @@ export {
3436 MucSelect ,
3537 MucErrorList ,
3638 MucIcon ,
39+ MucDivider ,
40+ MucLink ,
3741} ;
You can’t perform that action at this time.
0 commit comments