Skip to content

Commit

Permalink
Merge pull request #72 from AstarNetwork/feat/add-info-icon
Browse files Browse the repository at this point in the history
feat: added icon-info
  • Loading branch information
impelcrypto authored Aug 4, 2023
2 parents 93341fb + 08ffc7e commit db90d62
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/Icons/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ import IconEquip from "./src/IconEquip.vue";
import IconUnequip from "./src/IconUnequip.vue";
import IconSideNFT from "./src/IconSideNFT.vue";
import IconEcosystem from "./src/IconEcosystem.vue";
import IconInfo from "./src/IconInfo.vue";

export const IconsPlugin: Plugin = {
install(app: App) {
Expand Down Expand Up @@ -119,6 +120,7 @@ export const IconsPlugin: Plugin = {
app.component("astar-icon-unequip", IconUnequip);
app.component("astar-icon-side-nft", IconSideNFT);
app.component("astar-icon-ecosystem", IconEcosystem);
app.component("astar-icon-info", IconInfo);
},
};

Expand Down Expand Up @@ -182,4 +184,5 @@ export {
IconUnequip,
IconSideNFT,
IconEcosystem,
IconInfo,
};
25 changes: 25 additions & 0 deletions packages/Icons/src/IconInfo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<template>
<GoogleMaterialIcon />
<span
class="material-symbols-outlined"
:style="size && `font-size: ${size}px`"
>
info
</span>
</template>

<script lang="ts">
import { defineComponent } from "vue";
import GoogleMaterialIcon from "./GoogleMaterialIcon.vue";
export default defineComponent({
components: { GoogleMaterialIcon },
props: {
size: {
type: String,
required: false,
default: "",
},
},
});
</script>
11 changes: 11 additions & 0 deletions src/stories/Icons/IconInfo.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import IconInfo from "packages/Icons/src/IconInfo.vue";

export default {
title: "Icons/IconInfo",
component: IconInfo,
};

export const DefaultIcon = () => ({
components: { IconInfo },
template: "<IconInfo />",
});

0 comments on commit db90d62

Please sign in to comment.