File tree Expand file tree Collapse file tree 4 files changed +63
-0
lines changed Expand file tree Collapse file tree 4 files changed +63
-0
lines changed Original file line number Diff line number Diff line change 1+ import { fn } from "@storybook/test" ;
2+
3+ import MucIcon from "./MucIcon.vue" ;
4+
5+ export default {
6+ component : MucIcon ,
7+ title : "MucIcon" ,
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-icon\` component is a wrapper commponent for all icons in the patternlab.
15+
16+ [🔗 Patternlab-Docs](https://patternlab.muenchen.space/?p=viewall-guidelines-icons)
17+ [🖼 Iconography](https://it-at-m.github.io/muc-patternlab-vue/?path=/docs/iconography--docs)
18+ ` ,
19+ } ,
20+ } ,
21+ } ,
22+ } ;
23+
24+ export const Weather = {
25+ args : {
26+ icon : "weather" ,
27+ } ,
28+ } ;
29+
30+ export const Youtube = {
31+ args : {
32+ icon : "youtube" ,
33+ color : "red" ,
34+ } ,
35+ } ;
Original file line number Diff line number Diff line change 1+ <template >
2+ <svg
3+ aria-hidden =" true"
4+ class =" m-button__icon"
5+ :style =" { color: color }"
6+ >
7+ <use :href =" '#icon-' + icon" />
8+ </svg >
9+ </template >
10+
11+ <script setup lang="ts">
12+ defineProps <{
13+ /**
14+ * String of the icon to be displayed.
15+ */
16+ icon: string ;
17+
18+ /**
19+ * Optional css-color for the icon.
20+ */
21+ color? : string ;
22+ }>();
23+ </script >
Original file line number Diff line number Diff line change 1+ import MucIcon from "./MucIcon.vue" ;
2+
3+ export { MucIcon } ;
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 { MucIcon } from "./Icon" ;
67import { MucIntro } from "./Intro" ;
78
89export {
@@ -14,4 +15,5 @@ export {
1415 MucCardContainer ,
1516 MucComment ,
1617 MucCommentText ,
18+ MucIcon ,
1719} ;
You can’t perform that action at this time.
0 commit comments