generated from it-at-m/oss-repository-en-template
-
Notifications
You must be signed in to change notification settings - Fork 1
✨ 95 build a wrapper component for icons #97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
57a156e
:sparkles: added muc-icon #95
langehm 5fd8df7
:memo: added muc-icon documentation #95
langehm 7d9ce1f
:memo: added muc-icon export #95
langehm 685fae0
:memo: added documentation for props #95
langehm dbe39b6
:art: removed all icons except two #61
langehm 3bd6ffc
Merge branch 'beta' into 95-build-a-wrapper-component-for-icons
FabianWilms 0e7754c
Update src/components/Icon/MucIcon.vue
langehm 48d29af
Update src/components/Icon/MucIcon.stories.ts
langehm 30ca279
Update src/components/Icon/MucIcon.vue
langehm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import { fn } from "@storybook/test"; | ||
|
|
||
| import MucIcon from "./MucIcon.vue"; | ||
|
|
||
| export default { | ||
| component: MucIcon, | ||
| title: "MucIcon", | ||
| tags: ["autodocs"], | ||
| // 👇 Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked | ||
| args: { onClick: fn() }, | ||
| parameters: { | ||
| docs: { | ||
| description: { | ||
| component: `The \`muc-icon\` component is a wrapper commponent for all icons in the patternlab. | ||
|
|
||
| [🔗 Patternlab-Docs](https://patternlab.muenchen.space/?p=viewall-guidelines-icons) | ||
| [🖼 Iconography](https://it-at-m.github.io/muc-patternlab-vue/?path=/docs/iconography--docs) | ||
| `, | ||
| }, | ||
| }, | ||
| }, | ||
| }; | ||
|
|
||
| export const Weather = { | ||
| args: { | ||
| icon: "weather", | ||
| }, | ||
| }; | ||
|
|
||
| export const Youtube = { | ||
| args: { | ||
| icon: "youtube", | ||
| color: "red", | ||
| }, | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| <template> | ||
| <svg | ||
| aria-hidden="true" | ||
| class="m-button__icon" | ||
| :style="{ color: color }" | ||
| > | ||
| <use :href="'#icon-' + icon" /> | ||
| </svg> | ||
| </template> | ||
|
|
||
| <script setup lang="ts"> | ||
| defineProps<{ | ||
| /** | ||
| * String of the icon to be displayed. | ||
| */ | ||
| icon: string; | ||
|
|
||
| /** | ||
| * Optional css-color for the icon. | ||
| */ | ||
| color?: string; | ||
| }>(); | ||
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| import MucIcon from "./MucIcon.vue"; | ||
|
|
||
| export { MucIcon }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.