Skip to content

Commit

Permalink
fix: review
Browse files Browse the repository at this point in the history
  • Loading branch information
dauriamarco committed Sep 26, 2023
1 parent b9cba55 commit 3716807
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/components/sbb-tab-group/sbb-tab-group.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { withActions } from '@storybook/addon-actions/decorator';
import type { Meta, StoryObj, ArgTypes, Args, Decorator } from '@storybook/html';
import type { InputType } from '@storybook/types';

const firstTabTitle = ({ label, ...args }): JSX.Element => (
const firstTabTitle = (label, args): JSX.Element => (
<sbb-tab-title {...args}>{label}</sbb-tab-title>
);

Expand Down Expand Up @@ -40,9 +40,9 @@ const tabPanelFour = (): JSX.Element => (
</article>
);

const DefaultTemplate = (args): JSX.Element => (
<sbb-tab-group size={args.size} initial-selected-index="0">
{firstTabTitle(args)}
const DefaultTemplate = ({ size, label, ...args }): JSX.Element => (
<sbb-tab-group size={size} initial-selected-index="0">
{firstTabTitle(label, args)}
{tabPanelOne()}

<sbb-tab-title>Tab title two</sbb-tab-title>
Expand All @@ -56,9 +56,9 @@ const DefaultTemplate = (args): JSX.Element => (
</sbb-tab-group>
);

const IconsAndNumbersTemplate = (args): JSX.Element => (
<sbb-tab-group size={args.size} initial-selected-index="0">
{firstTabTitle(args)}
const IconsAndNumbersTemplate = ({ size, label, ...args }): JSX.Element => (
<sbb-tab-group size={size} initial-selected-index="0">
{firstTabTitle(label, args)}
{tabPanelOne()}

<sbb-tab-title amount={args.amount} icon-name="swisspass-small">
Expand All @@ -78,10 +78,10 @@ const IconsAndNumbersTemplate = (args): JSX.Element => (
</sbb-tab-group>
);

const NestedTemplate = (args): JSX.Element => (
<sbb-tab-group size={args.size} initial-selected-index="0">
{firstTabTitle(args)}
<sbb-tab-group size={args.size} initial-selected-index="1">
const NestedTemplate = ({ size, label, ...args }): JSX.Element => (
<sbb-tab-group size={size} initial-selected-index="0">
{firstTabTitle(label, args)}
<sbb-tab-group size={size} initial-selected-index="1">
<sbb-tab-title level="2">Nested tab</sbb-tab-title>
<div>
Diam maecenas ultricies mi eget mauris pharetra et ultrices neque ornare aenean euismod
Expand Down

0 comments on commit 3716807

Please sign in to comment.