Skip to content

Commit

Permalink
refactor: delete type when type inference is possible
Browse files Browse the repository at this point in the history
  • Loading branch information
lokba committed Oct 4, 2022
1 parent fa46bd7 commit dec6003
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 18 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/@common/Button/Button.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { ComponentMeta, ComponentStory } from "@storybook/react";
import Button, { ButtonProps } from "./Button";
import Button from "./Button";

export default {
title: "form/Button",
component: Button,
} as ComponentMeta<typeof Button>;

const Template: ComponentStory<typeof Button> = (args: ButtonProps) => <Button {...args} />;
const Template: ComponentStory<typeof Button> = (args) => <Button {...args} />;

export const Default = Template.bind({});
Default.args = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { ComponentMeta, ComponentStory } from "@storybook/react";
import Container, { CONTAINER_SIZE, ContainerProps } from "./Container";
import Container, { CONTAINER_SIZE } from "./Container";

export default {
title: "components/Container",
component: Container,
} as ComponentMeta<typeof Container>;

const Template: ComponentStory<typeof Container> = (args: ContainerProps) => (
<Container {...args} />
);
const Template: ComponentStory<typeof Container> = (args) => <Container {...args} />;

export const Default = Template.bind({});
Default.args = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { ComponentMeta, ComponentStory } from "@storybook/react";
import Description, { DescriptionProps } from "./Description";
import Description from "./Description";

export default {
title: "form/Description",
component: Description,
} as ComponentMeta<typeof Description>;

const Template: ComponentStory<typeof Description> = (args: DescriptionProps) => (
<Description {...args} />
);
const Template: ComponentStory<typeof Description> = (args) => <Description {...args} />;

export const Default = Template.bind({});
Default.args = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { ComponentMeta, ComponentStory } from "@storybook/react";
import Button, { IconButtonProps } from "./IconButton";
import Button from "./IconButton";

export default {
title: "components/IconButton",
component: Button,
} as ComponentMeta<typeof Button>;

const Template: ComponentStory<typeof Button> = (args: IconButtonProps) => <Button {...args} />;
const Template: ComponentStory<typeof Button> = (args) => <Button {...args} />;

export const Default = Template.bind({});
Default.args = {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/@common/Label/Label.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { ComponentMeta, ComponentStory } from "@storybook/react";
import Label, { LabelProps } from "./Label";
import Label from "./Label";

export default {
title: "form/Label",
component: Label,
} as ComponentMeta<typeof Label>;

const Template: ComponentStory<typeof Label> = (args: LabelProps) => <Label {...args} />;
const Template: ComponentStory<typeof Label> = (args) => <Label {...args} />;

export const Default = Template.bind({});
Default.args = {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/@common/Panel/Panel.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { ComponentMeta, ComponentStory } from "@storybook/react";
import Panel, { PanelProps } from "./Panel";
import Panel from "./Panel";

export default {
title: "components/Panel",
component: Panel,
} as ComponentMeta<typeof Panel>;

const Template: ComponentStory<typeof Panel> = (args: PanelProps) => <Panel {...args}>본문</Panel>;
const Template: ComponentStory<typeof Panel> = (args) => <Panel {...args}>본문</Panel>;

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

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/@common/Radio/Radio.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { ComponentMeta, ComponentStory } from "@storybook/react";
import Radio, { RadioProps } from "./Radio";
import Radio from "./Radio";

export default {
title: "form/Radio",
component: Radio,
} as ComponentMeta<typeof Radio>;

const Template: ComponentStory<typeof Radio> = (args: RadioProps) => <Radio {...args} />;
const Template: ComponentStory<typeof Radio> = (args) => <Radio {...args} />;

export const Default = Template.bind({});
Default.args = {
Expand Down

0 comments on commit dec6003

Please sign in to comment.