feat: add sb documentation for svg component

This commit is contained in:
2025-08-21 23:42:34 -03:00
parent c8389c37b0
commit 73e328b69d
4 changed files with 225 additions and 2 deletions

View File

@@ -90,6 +90,16 @@
"type": "Meta<PageComponent>",
"defaultValue": "{\n title: 'Organisms/Page',\n component: PageComponent,\n parameters: {\n // More on how to position stories at: https://storybook.js.org/docs/configure/story-layout\n layout: 'fullscreen',\n },\n}"
},
{
"name": "meta",
"ctype": "miscellaneous",
"subtype": "variable",
"file": "projects/my-wallet-ds/src/stories/svg.stories.ts",
"deprecated": false,
"deprecationMessage": "",
"type": "Meta<SvgComponent>",
"defaultValue": "{\n title: 'Atoms/Svg',\n component: SvgComponent,\n tags: ['autodocs'],\n args: {\n width: \"24px\",\n height: \"24px\",\n color: \"#000000\",\n symbol: \"stock-line\",\n },\n argTypes: {\n width: {\n description: 'Icon width with units (px, rem, etc)',\n table: {defaultValue: {detail: 'Defaults to 24px', summary: '24px'}}\n },\n height: {\n description: 'Icon height with units (px, rem, etc)',\n table: {defaultValue: {detail: 'Defaults to 24px', summary: '24px'}}\n },\n color: {\n description: 'Icon color',\n table: {defaultValue: {detail: 'Defaults to black', summary: '#000000'}}\n },\n symbol: {\n control: 'select',\n options: svgList,\n description: 'Icon name',\n table: {defaultValue: {detail: 'Defaults to none (empty string)', summary: '(empty string)'}}\n }, \n }\n}"
},
{
"name": "Paragraph",
"ctype": "miscellaneous",
@@ -140,6 +150,26 @@
"type": "Story",
"defaultValue": "{\n args: {\n size: 'small',\n label: 'Button',\n },\n}"
},
{
"name": "Svg",
"ctype": "miscellaneous",
"subtype": "variable",
"file": "projects/my-wallet-ds/src/stories/svg.stories.ts",
"deprecated": false,
"deprecationMessage": "",
"type": "",
"defaultValue": "Template.bind({})"
},
{
"name": "Template",
"ctype": "miscellaneous",
"subtype": "variable",
"file": "projects/my-wallet-ds/src/stories/svg.stories.ts",
"deprecated": false,
"deprecationMessage": "",
"type": "",
"defaultValue": "(args: { width: string, height: string, color: string, symbol: string,}) => ({\n props: args,\n template: `\n <div style=\"display:flex; justify-content: center;\">\n <mw-svg\n width=\"${args.width}\"\n height=\"${args.height}\"\n color=\"${args.color}\"\n symbol=\"${args.symbol}\"\n ></mw-svg>\n </div>`\n})"
},
{
"name": "Template",
"ctype": "miscellaneous",
@@ -148,7 +178,7 @@
"deprecated": false,
"deprecationMessage": "",
"type": "",
"defaultValue": "(args: {variant: TypographyVariants, ellipsis: boolean, letterSpacing: string, lineHeight: null|string, size: string, color: string, maxWidth: null|string}) => ({\n props: args,\n template: `\n <my-wallet-typography \n [variant]=\"${args.variant}\"\n [ellipsis]=\"${args.ellipsis}\" \n color=\"${args.color}\"\n letterSpacing=\"${args.letterSpacing}\"\n lineHeight=\"${args.lineHeight}\"\n maxWidth=\"${args.maxWidth}\"\n size=\"${args.size}\"\n >Texto</my-wallet-typography>`,\n})"
"defaultValue": "(args: {variant: TypographyVariants, ellipsis: boolean, letterSpacing: string, lineHeight: null|string, size: string, color: string, maxWidth: null|string}) => ({\n props: args,\n template: `\n <mw-typography \n [variant]=\"${args.variant}\"\n [ellipsis]=\"${args.ellipsis}\" \n color=\"${args.color}\"\n letterSpacing=\"${args.letterSpacing}\"\n lineHeight=\"${args.lineHeight}\"\n maxWidth=\"${args.maxWidth}\"\n size=\"${args.size}\"\n >Texto</mw-typography>`,\n})"
}
],
"functions": [],
@@ -305,6 +335,38 @@
"defaultValue": "{\n title: 'Organisms/Page',\n component: PageComponent,\n parameters: {\n // More on how to position stories at: https://storybook.js.org/docs/configure/story-layout\n layout: 'fullscreen',\n },\n}"
}
],
"projects/my-wallet-ds/src/stories/svg.stories.ts": [
{
"name": "meta",
"ctype": "miscellaneous",
"subtype": "variable",
"file": "projects/my-wallet-ds/src/stories/svg.stories.ts",
"deprecated": false,
"deprecationMessage": "",
"type": "Meta<SvgComponent>",
"defaultValue": "{\n title: 'Atoms/Svg',\n component: SvgComponent,\n tags: ['autodocs'],\n args: {\n width: \"24px\",\n height: \"24px\",\n color: \"#000000\",\n symbol: \"stock-line\",\n },\n argTypes: {\n width: {\n description: 'Icon width with units (px, rem, etc)',\n table: {defaultValue: {detail: 'Defaults to 24px', summary: '24px'}}\n },\n height: {\n description: 'Icon height with units (px, rem, etc)',\n table: {defaultValue: {detail: 'Defaults to 24px', summary: '24px'}}\n },\n color: {\n description: 'Icon color',\n table: {defaultValue: {detail: 'Defaults to black', summary: '#000000'}}\n },\n symbol: {\n control: 'select',\n options: svgList,\n description: 'Icon name',\n table: {defaultValue: {detail: 'Defaults to none (empty string)', summary: '(empty string)'}}\n }, \n }\n}"
},
{
"name": "Svg",
"ctype": "miscellaneous",
"subtype": "variable",
"file": "projects/my-wallet-ds/src/stories/svg.stories.ts",
"deprecated": false,
"deprecationMessage": "",
"type": "",
"defaultValue": "Template.bind({})"
},
{
"name": "Template",
"ctype": "miscellaneous",
"subtype": "variable",
"file": "projects/my-wallet-ds/src/stories/svg.stories.ts",
"deprecated": false,
"deprecationMessage": "",
"type": "",
"defaultValue": "(args: { width: string, height: string, color: string, symbol: string,}) => ({\n props: args,\n template: `\n <div style=\"display:flex; justify-content: center;\">\n <mw-svg\n width=\"${args.width}\"\n height=\"${args.height}\"\n color=\"${args.color}\"\n symbol=\"${args.symbol}\"\n ></mw-svg>\n </div>`\n})"
}
],
"projects/my-wallet-ds/src/stories/typography.stories.ts": [
{
"name": "Paragraph",
@@ -324,7 +386,7 @@
"deprecated": false,
"deprecationMessage": "",
"type": "",
"defaultValue": "(args: {variant: TypographyVariants, ellipsis: boolean, letterSpacing: string, lineHeight: null|string, size: string, color: string, maxWidth: null|string}) => ({\n props: args,\n template: `\n <my-wallet-typography \n [variant]=\"${args.variant}\"\n [ellipsis]=\"${args.ellipsis}\" \n color=\"${args.color}\"\n letterSpacing=\"${args.letterSpacing}\"\n lineHeight=\"${args.lineHeight}\"\n maxWidth=\"${args.maxWidth}\"\n size=\"${args.size}\"\n >Texto</my-wallet-typography>`,\n})"
"defaultValue": "(args: {variant: TypographyVariants, ellipsis: boolean, letterSpacing: string, lineHeight: null|string, size: string, color: string, maxWidth: null|string}) => ({\n props: args,\n template: `\n <mw-typography \n [variant]=\"${args.variant}\"\n [ellipsis]=\"${args.ellipsis}\" \n color=\"${args.color}\"\n letterSpacing=\"${args.letterSpacing}\"\n lineHeight=\"${args.lineHeight}\"\n maxWidth=\"${args.maxWidth}\"\n size=\"${args.size}\"\n >Texto</mw-typography>`,\n})"
}
],
"projects/my-wallet-ds/.storybook/preview.ts": [
@@ -539,6 +601,36 @@
"coverageCount": "0/1",
"status": "low"
},
{
"filePath": "projects/my-wallet-ds/src/stories/svg.stories.ts",
"type": "variable",
"linktype": "miscellaneous",
"linksubtype": "variable",
"name": "meta",
"coveragePercent": 0,
"coverageCount": "0/1",
"status": "low"
},
{
"filePath": "projects/my-wallet-ds/src/stories/svg.stories.ts",
"type": "variable",
"linktype": "miscellaneous",
"linksubtype": "variable",
"name": "Svg",
"coveragePercent": 0,
"coverageCount": "0/1",
"status": "low"
},
{
"filePath": "projects/my-wallet-ds/src/stories/svg.stories.ts",
"type": "variable",
"linktype": "miscellaneous",
"linksubtype": "variable",
"name": "Template",
"coveragePercent": 0,
"coverageCount": "0/1",
"status": "low"
},
{
"filePath": "projects/my-wallet-ds/src/stories/typography.stories.ts",
"type": "variable",