1- import { Meta , Story , Canvas , ArgsTable } from ' @storybook/addon-docs' ;
1+ import { Meta , Story , Canvas , ArgsTable , Source } from ' @storybook/addon-docs' ;
22
33import { Icon } from ' @/polaris-vue' ;
44
55<Meta
66 title = " Components / Images & Icons / Icon"
77 component = { Icon }
88 argTypes = { {
9- source: {
10- name: ' source' ,
11- options: [
12- ' placeholder' ,
13- ],
14- control: { type: ' select' },
15- table: {
16- type: {
17- summary: ' functionComponent | "placeholder" | svg' ,
18- },
9+ accessibilityLabel: {
10+ table: {
11+ type: { summary: null },
12+ },
13+ },
14+ backdrop: {
15+ table: {
16+ type: { summary: null },
17+ },
18+ },
19+ source: {
20+ name: ' source' ,
21+ defaultValue: ' CirclePlusMinor' ,
22+ options: [
23+ ' CirclePlusMinor' ,
24+ ' placeholder' ,
25+ ],
26+ control: {
27+ type: ' select' ,
28+ labels: {
29+ CirclePlusMinor: ' default' ,
1930 },
31+ },
32+ table: {
33+ type: {
34+ summary: ' Shopify SVG Icon | "placeholder" | svg' ,
35+ },
36+ },
2037 },
21- color: {
38+ color: {
2239 name: ' color' ,
2340 options: [
41+ null ,
2442 ' base' ,
2543 ' subdued' ,
2644 ' critical' ,
@@ -30,10 +48,15 @@ import { Icon } from '@/polaris-vue';
3048 ' success' ,
3149 ' primary' ,
3250 ],
33- control: { type: ' select' },
51+ control: {
52+ type: ' select' ,
53+ labels: {
54+ null: ' default' ,
55+ },
56+ },
3457 table: {
3558 type: {
36- summary: ' base | subdued | critical | interactive | warning | highlight | success | primary '
59+ summary: null
3760 },
3861 },
3962 },
@@ -57,6 +80,10 @@ Icons are used to visually communicate core parts of the product and available a
5780They can act as wayfinding tools to help merchants more easily understand where they are in the product,
5881and common interaction patterns that are available.
5982
83+ * Note: To use icons, you must add ` vue-svg-loader ` package to your project first, by running:* ` yarn add -D vue-svg-loader `
84+
85+ You can find icon list from ** Shopify Icon Library** : [ here] ( https://polaris-icons.shopify.com/ ) .
86+
6087<Canvas >
6188 <Story name = " Icon" >
6289 { Template .bind ({})}
0 commit comments