diff --git a/src/components/button/button-link/readme.md b/src/components/button/button-link/readme.md index 481cd996a68..37f428671fd 100644 --- a/src/components/button/button-link/readme.md +++ b/src/components/button/button-link/readme.md @@ -1,5 +1,5 @@ The `sbb-button-link` component provides the same functionality as a native ``, -despite it appears as a button enhanced with the SBB Design. +despite its appearance as a button enhanced with the SBB Design. ```html Button text diff --git a/src/components/card/card/card.stories.ts b/src/components/card/card/card.stories.ts index cc504923000..aee0338feeb 100644 --- a/src/components/card/card/card.stories.ts +++ b/src/components/card/card/card.stories.ts @@ -61,16 +61,10 @@ const TemplateWithBadge = ({ size, color }: Args): TemplateResult => html` const TemplateAction = ({ label, ...args }: Args): TemplateResult => { if (args.href) { - delete args.type; - delete args.form; - delete args.value; - delete args.name; + ['type', 'form', 'value', 'name'].forEach((k) => delete args[k]); return html`${label}`; } else { - delete args.href; - delete args.target; - delete args.rel; - delete args.download; + ['href', 'target', 'rel', 'download'].forEach((k) => delete args[k]); return html`${label}`; } }; @@ -228,20 +222,26 @@ const defaultArgTypes: ArgTypes = { color, }; -const defaultArgTypesAction: ArgTypes = { +const defaultArgTypesButton: ArgTypes = { ...defaultArgTypes, active, label, - href, - download, - target, - rel, name, type, form, value, }; +const defaultArgTypesLink: ArgTypes = { + ...defaultArgTypes, + active, + label, + href, + download, + target, + rel, +}; + const defaultArgs: Args = { size: 'm', color: color.options[0], @@ -418,25 +418,25 @@ export const SizeXXXLWithBadge: StoryObj = { export const Link: StoryObj = { render: TemplateCardAction, - argTypes: defaultArgTypesAction, + argTypes: defaultArgTypesLink, args: { ...defaultArgsLink }, }; export const Button: StoryObj = { render: TemplateCardAction, - argTypes: defaultArgTypesAction, + argTypes: defaultArgTypesButton, args: { ...defaultArgsButton }, }; export const ButtonActive: StoryObj = { render: TemplateCardAction, - argTypes: defaultArgTypesAction, + argTypes: defaultArgTypesButton, args: { ...defaultArgsButton, active: true }, }; export const ButtonActiveMilk: StoryObj = { render: TemplateCardAction, - argTypes: defaultArgTypesAction, + argTypes: defaultArgTypesButton, args: { ...defaultArgsButton, color: color.options[1], @@ -446,7 +446,7 @@ export const ButtonActiveMilk: StoryObj = { export const ButtonActiveTransparentBordered: StoryObj = { render: TemplateCardAction, - argTypes: defaultArgTypesAction, + argTypes: defaultArgTypesButton, args: { ...defaultArgsButton, color: color.options[2], @@ -456,7 +456,7 @@ export const ButtonActiveTransparentBordered: StoryObj = { export const ButtonActiveTransparentBorderedDashed: StoryObj = { render: TemplateCardAction, - argTypes: defaultArgTypesAction, + argTypes: defaultArgTypesButton, args: { ...defaultArgsButton, color: color.options[3], @@ -466,31 +466,31 @@ export const ButtonActiveTransparentBorderedDashed: StoryObj = { export const ButtonWithSbbBadge: StoryObj = { render: TemplateCardActionWithBadge, - argTypes: defaultArgTypesAction, + argTypes: defaultArgTypesButton, args: { ...defaultArgsButton }, }; export const LinkWithSbbBadge: StoryObj = { render: TemplateCardActionWithBadge, - argTypes: defaultArgTypesAction, + argTypes: defaultArgTypesLink, args: { ...defaultArgsLink }, }; export const LinkActiveWithSbbBadge: StoryObj = { render: TemplateCardActionWithBadge, - argTypes: defaultArgTypesAction, + argTypes: defaultArgTypesLink, args: { ...defaultArgsLink, active: true }, }; export const FixedHeight: StoryObj = { render: TemplateCardActionFixedHeight, - argTypes: defaultArgTypesAction, + argTypes: defaultArgTypesButton, args: { ...defaultArgsButton }, }; export const Multiple: StoryObj = { render: TemplateCardActionMultipleCards, - argTypes: defaultArgTypesAction, + argTypes: defaultArgTypesLink, args: { ...defaultArgsLink }, }; diff --git a/src/components/link/link-button/readme.md b/src/components/link/link-button/readme.md index 78c73fb3be6..e0e8d53a646 100644 --- a/src/components/link/link-button/readme.md +++ b/src/components/link/link-button/readme.md @@ -1,5 +1,5 @@ The `sbb-link-button` component provides the same functionality as a native `