Skip to content

Commit

Permalink
Migrate repository directory to CSF3 notation
Browse files Browse the repository at this point in the history
  • Loading branch information
kamegoro committed Nov 1, 2023
1 parent 7b68020 commit ec8831e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 19 deletions.
16 changes: 5 additions & 11 deletions frontend/src/components/repository/ChartViewer.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ChartViewer.stories.ts|tsx

import { ComponentStory, ComponentMeta } from "@storybook/react";
import { StoryFn, Meta } from "@storybook/react";
import ChartViewer from "./ChartViewer";

//👇 This default export determines where your story goes in the story list
Expand All @@ -11,14 +11,11 @@ export default {
*/
title: "ChartViewer",
component: ChartViewer,
} as ComponentMeta<typeof ChartViewer>;
} as Meta<typeof ChartViewer>;

//👇 We create a “template” of how args map to rendering
const Template: ComponentStory<typeof ChartViewer> = (args) => (
<ChartViewer {...args} />
);

export const Default = Template.bind({});
export const Default = {
args: defaultArgs,
};

const defaultArgs = {
chart: {
Expand All @@ -27,6 +24,3 @@ const defaultArgs = {
version: "v1.0.0",
},
};

//@ts-ignore
Default.args = defaultArgs;
10 changes: 6 additions & 4 deletions frontend/src/components/repository/RepositoriesList.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RepositoriesList.stories.ts|tsx

import { ComponentStory, ComponentMeta } from "@storybook/react";
import { StoryFn, Meta } from "@storybook/react";
import RepositoriesList from "./RepositoriesList";

//👇 This default export determines where your story goes in the story list
Expand All @@ -11,10 +11,10 @@ export default {
*/
title: "RepositoriesList",
component: RepositoriesList,
} as ComponentMeta<typeof RepositoriesList>;
} as Meta<typeof RepositoriesList>;

//👇 We create a “template” of how args map to rendering
const Template: ComponentStory<typeof RepositoriesList> = () => (
const Template: StoryFn<typeof RepositoriesList> = () => (
<RepositoriesList
selectedRepository={undefined}
// in this case we allow Unexpected empty method
Expand All @@ -24,4 +24,6 @@ const Template: ComponentStory<typeof RepositoriesList> = () => (
/>
);

export const Default = Template.bind({});
export const Default = {
render: Template,
};
10 changes: 6 additions & 4 deletions frontend/src/components/repository/RepositoryViewer.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// RepositoryViewer.stories.ts|tsx

import { ComponentStory, ComponentMeta } from "@storybook/react";
import { StoryFn, Meta } from "@storybook/react";
import RepositoryViewer from "./RepositoryViewer";

//👇 This default export determines where your story goes in the story list
Expand All @@ -11,11 +11,13 @@ export default {
*/
title: "RepositoryViewer",
component: RepositoryViewer,
} as ComponentMeta<typeof RepositoryViewer>;
} as Meta<typeof RepositoryViewer>;

//👇 We create a “template” of how args map to rendering
const Template: ComponentStory<typeof RepositoryViewer> = () => (
const Template: StoryFn<typeof RepositoryViewer> = () => (
<RepositoryViewer repository={undefined} />
);

export const Default = Template.bind({});
export const Default = {
render: Template,
};

0 comments on commit ec8831e

Please sign in to comment.