Skip to content

Commit

Permalink
Refactor stories
Browse files Browse the repository at this point in the history
  • Loading branch information
mohdsayed committed Aug 2, 2023
1 parent 5c5a553 commit ef10c90
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
"**/node_modules/**",
"dist/**",
"out/**",
"data/",
"coverage/"
"data/**",
"coverage/**"
],
"rules": {
"array-callback-return": "error",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* External dependencies.
*/
import type { Meta } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react';

/**
* Internal dependencies.
Expand All @@ -27,11 +27,12 @@ import { COLOR_MAP } from '../../../theme/colors';
const meta: Meta<typeof Circle> = {
title: 'Extension/DesignSystem/Circle',
component: Circle,
tags: ['autodocs'],
};

export default meta;

export const Primary = {
export const Primary: StoryObj<typeof meta> = {
args: {
color: COLOR_MAP.functional,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* External dependencies.
*/
import type { Meta } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react';

/**
* Internal dependencies.
Expand All @@ -27,11 +27,12 @@ import { COLOR_MAP } from '../../../theme/colors';
const meta: Meta<typeof CirclePieChart> = {
title: 'Extension/DesignSystem/CirclePieChart',
component: CirclePieChart,
tags: ['autodocs'],
};

export default meta;

export const Primary = {
export const Primary: StoryObj<typeof meta> = {
args: {
centerCount: 5,
data: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import Accordion from '..';
// @todo To be removed after we add any story.
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
const meta: Meta<typeof Accordion> = {
title: 'Extension/Accordion',
title: 'Extension/DevTools/Accordion',
component: Accordion,
tags: ['autodocs'],
argTypes: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import type { Meta, StoryObj } from '@storybook/react';
import { CookieDetails } from '../..';

const meta = {
title: 'Extension/CookiesPanel/CookieDetails',
title: 'Extension/DevTools/CookiesPanel/CookieDetails',
component: CookieDetails,
tags: ['autodocs'],
} as Meta<typeof CookieDetails>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import Details from '../details';
import type { CookieTableData } from '../../../../../../stateProviders/syncCookieStore';

const meta = {
title: 'Extension/CookiesPanel/CookieDetails/Details',
title: 'Extension/DevTools/CookiesPanel/CookieDetails/Details',
component: Details,
tags: ['autodocs'],
} as Meta<typeof Details>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { TempCookieData } from './tempData';
import { CookieTable } from '../..';

const meta = {
title: 'Extension/CookiesPanel/CookieTable',
title: 'Extension/DevTools/CookiesPanel/CookieTable',
component: CookieTable,
tags: ['autodocs'],
} as Meta<typeof CookieTable>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* External dependencies.
*/
import type { Meta } from '@storybook/react';
import type { Meta, StoryObj } from '@storybook/react';

/**
* Internal dependencies.
Expand All @@ -25,13 +25,14 @@ import Legend from '..';
import { COLOR_MAP } from '../../../../design-system/theme/colors';

const meta: Meta<typeof Legend> = {
title: 'Extension/Popup/components',
title: 'Extension/Popup/Legend',
component: Legend,
tags: ['autodocs'],
};

export default meta;

export const Primary = {
export const Primary: StoryObj<typeof meta> = {
args: {
legendItemList: [
{ label: 'Functional', count: 10, color: COLOR_MAP.functional },
Expand Down

0 comments on commit ef10c90

Please sign in to comment.