Skip to content

Commit

Permalink
Fix StoryBook Story imports (#1090)
Browse files Browse the repository at this point in the history
  • Loading branch information
bayasdev authored Nov 5, 2024
1 parent c417ecc commit da88329
Show file tree
Hide file tree
Showing 60 changed files with 124 additions and 120 deletions.
4 changes: 2 additions & 2 deletions src/components/Accordion/Accordion.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import React from "react";
import { useState } from "@storybook/client-api";
import { Meta, Story } from "@storybook/react";
import { Meta, StoryFn } from "@storybook/react";

import StoryThemeProvider from "../../utils/StoryThemeProvider";
import Accordion from "./";
Expand All @@ -29,7 +29,7 @@ export default {
argTypes: {},
} as Meta<typeof Accordion>;

const Template: Story<AccordionProps> = ({
const Template: StoryFn<AccordionProps> = ({
title,
children,
disabled,
Expand Down
4 changes: 2 additions & 2 deletions src/components/ApplicationLogo/ApplicationLogo.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import React from "react";
import { Meta, Story } from "@storybook/react";
import { Meta, StoryFn } from "@storybook/react";

import ApplicationLogo from "./";
import { ApplicationLogoProps } from "./ApplicationLogo.types";
Expand All @@ -28,7 +28,7 @@ export default {
argTypes: {},
} as Meta<typeof ApplicationLogo>;

const Template: Story<ApplicationLogoProps> = (args) => (
const Template: StoryFn<ApplicationLogoProps> = (args) => (
<StoryThemeProvider>
<GlobalStyles />
<div style={{ maxWidth: "200px" }}>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Autocomplete/Autocomplete.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import React from "react";
import { Meta, Story } from "@storybook/react";
import { Meta, StoryFn } from "@storybook/react";
import { useState } from "@storybook/addons";

import Autocomplete from "./";
Expand All @@ -34,7 +34,7 @@ export default {
argTypes: {},
} as Meta<typeof Autocomplete>;

const Template: Story<AutocompleteProps> = ({
const Template: StoryFn<AutocompleteProps> = ({
label,
required,
tooltip,
Expand Down
4 changes: 2 additions & 2 deletions src/components/BackLink/BackLink.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import React from "react";
import { Meta, Story } from "@storybook/react";
import { Meta, StoryFn } from "@storybook/react";

import BackLink from "./";
import { BackLinkProps } from "./BackLink.types";
Expand All @@ -28,7 +28,7 @@ export default {
argTypes: {},
} as Meta<typeof BackLink>;

const Template: Story<BackLinkProps> = (args) => (
const Template: StoryFn<BackLinkProps> = (args) => (
<StoryThemeProvider>
<GlobalStyles />
<BackLink {...args} onClick={() => alert("You clicked me!")} />
Expand Down
4 changes: 2 additions & 2 deletions src/components/Badge/Badge.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import React from "react";
import { Meta, Story } from "@storybook/react";
import { Meta, StoryFn } from "@storybook/react";

import StoryThemeProvider from "../../utils/StoryThemeProvider";
import Badge from "./";
Expand All @@ -30,7 +30,7 @@ export default {
argTypes: {},
} as Meta<typeof Badge>;

const Template: Story<BadgeProps> = ({ label, id, sx, color }) => {
const Template: StoryFn<BadgeProps> = ({ label, id, sx, color }) => {
return (
<StoryThemeProvider>
<GlobalStyles />
Expand Down
4 changes: 2 additions & 2 deletions src/components/Box/Box.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import React, { useEffect, useRef } from "react";
import { Meta, Story } from "@storybook/react";
import { Meta, StoryFn } from "@storybook/react";

import Box from "./";
import { BoxProps } from "./Box.types";
Expand All @@ -29,7 +29,7 @@ export default {
argTypes: {},
} as Meta<typeof Box>;

const Template: Story<BoxProps> = (args) => {
const Template: StoryFn<BoxProps> = (args) => {
const reference = useRef<HTMLDivElement | null>(null);

useEffect(() => {
Expand Down
4 changes: 2 additions & 2 deletions src/components/BoxedIcon/BoxedIcon.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import React, { useEffect, useRef } from "react";
import { Meta, Story } from "@storybook/react";
import { Meta, StoryFn } from "@storybook/react";

import BoxedIcon from "./";
import { IBoxedIconProps } from "./BoxedIcon.types";
Expand All @@ -29,7 +29,7 @@ export default {
argTypes: {},
} as Meta<typeof BoxedIcon>;

const Template: Story<IBoxedIconProps> = (args) => {
const Template: StoryFn<IBoxedIconProps> = (args) => {
return (
<StoryThemeProvider>
<GlobalStyles />
Expand Down
4 changes: 2 additions & 2 deletions src/components/Breadcrumbs/Breadcrumbs.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import React from "react";
import { Meta, Story } from "@storybook/react";
import { Meta, StoryFn } from "@storybook/react";

import { BreadcrumbsOption, BreadcrumbsProps } from "./Breadcrumbs.types";
import Breadcrumbs from "./";
Expand All @@ -31,7 +31,7 @@ export default {
argTypes: {},
} as Meta<typeof Breadcrumbs>;

const Template: Story<BreadcrumbsProps> = (args) => (
const Template: StoryFn<BreadcrumbsProps> = (args) => (
<StoryThemeProvider>
<GlobalStyles />
<Breadcrumbs {...args} />
Expand Down
4 changes: 2 additions & 2 deletions src/components/Button/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import React from "react";
import { Meta, Story } from "@storybook/react";
import { Meta, StoryFn } from "@storybook/react";

import { ButtonProps } from "./Button.types";
import StoryThemeProvider from "../../utils/StoryThemeProvider";
Expand All @@ -29,7 +29,7 @@ export default {
argTypes: {},
} as Meta<typeof Button>;

const Template: Story<ButtonProps> = (args) => (
const Template: StoryFn<ButtonProps> = (args) => (
<StoryThemeProvider>
<GlobalStyles />
<Button {...args} onClick={() => alert("You clicked me!")} />
Expand Down
4 changes: 2 additions & 2 deletions src/components/Button/Button.uikit.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import React from "react";
import { Meta, Story } from "@storybook/react";
import { Meta, StoryFn } from "@storybook/react";

import Button from "./";
import { ButtonProps } from "./Button.types";
Expand All @@ -38,7 +38,7 @@ export default {
},
} as Meta<typeof Button>;

const Template: Story<ButtonProps> = (args) => (
const Template: StoryFn<ButtonProps> = (args) => (
<StoryThemeProvider>
<Box
sx={{
Expand Down
4 changes: 2 additions & 2 deletions src/components/ButtonGroup/ButtonGroup.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import React from "react";
import { Meta, Story } from "@storybook/react";
import { Meta, StoryFn } from "@storybook/react";

import { ButtonGroupProps } from "./ButtonGroup.types";
import StoryThemeProvider from "../../utils/StoryThemeProvider";
Expand All @@ -37,7 +37,7 @@ export default {
argTypes: {},
} as Meta<typeof ButtonGroup>;

const Template: Story<ButtonGroupProps> = (args) => (
const Template: StoryFn<ButtonGroupProps> = (args) => (
<StoryThemeProvider>
<GlobalStyles />
<ButtonGroup {...args}>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Checkbox/Checkbox.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import React from "react";
import { Meta, Story } from "@storybook/react";
import { Meta, StoryFn } from "@storybook/react";

import Checkbox from "./";
import { CheckboxProps } from "./Checkbox.types";
Expand All @@ -28,7 +28,7 @@ export default {
argTypes: {},
} as Meta<typeof Checkbox>;

const Template: Story<CheckboxProps> = (args) => (
const Template: StoryFn<CheckboxProps> = (args) => (
<StoryThemeProvider>
<GlobalStyles />
<Checkbox {...args} />
Expand Down
4 changes: 2 additions & 2 deletions src/components/CodeEditor/CodeEditor.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import React, { Fragment } from "react";
import { Meta, Story } from "@storybook/react";
import { Meta, StoryFn } from "@storybook/react";

import StoryThemeProvider from "../../utils/StoryThemeProvider";
import { CodeEditorProps } from "./CodeEditor.types";
Expand All @@ -30,7 +30,7 @@ export default {
argTypes: {},
} as Meta<typeof CodeEditor>;

const Template: Story<CodeEditorProps> = (args) => (
const Template: StoryFn<CodeEditorProps> = (args) => (
<StoryThemeProvider>
<GlobalStyles />
<CodeEditor {...args} />
Expand Down
4 changes: 2 additions & 2 deletions src/components/CodeSnippet/CodeSnippet.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import React from "react";
import { Meta, Story } from "@storybook/react";
import { Meta, StoryFn } from "@storybook/react";

import StoryThemeProvider from "../../utils/StoryThemeProvider";
import TestIcon from "../../utils/TestIcon";
Expand All @@ -31,7 +31,7 @@ export default {
argTypes: {},
} as Meta<typeof CodeSnippet>;

const Template: Story<CodeSnippetProps> = (args) => (
const Template: StoryFn<CodeSnippetProps> = (args) => (
<StoryThemeProvider>
<GlobalStyles />
<CodeSnippet {...args}>
Expand Down
4 changes: 2 additions & 2 deletions src/components/DataTable/DataTable.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import React, { useState } from "react";
import { Meta, Story } from "@storybook/react";
import { Meta, StoryFn } from "@storybook/react";

import DataTable from "./";
import { DataTableProps } from "./DataTable.types";
Expand All @@ -40,7 +40,7 @@ export default {
argTypes: {},
} as Meta;

const Template: Story<DataTableProps<RecordType>> = (args) => {
const Template: StoryFn<DataTableProps<RecordType>> = (args) => {
const [selected, setSelected] = useState<Array<keyof RecordType | string[]>>(
[],
);
Expand Down
4 changes: 2 additions & 2 deletions src/components/DateTimeInput/DateTimeInput.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import React from "react";
import { Meta, Story } from "@storybook/react";
import { Meta, StoryFn } from "@storybook/react";
import { useEffect, useState } from "@storybook/addons";
import { DateTime } from "luxon";

Expand All @@ -32,7 +32,7 @@ export default {
argTypes: {},
} as Meta<typeof DateTimeInput>;

const Template: Story<DateTimeInputProps> = ({
const Template: StoryFn<DateTimeInputProps> = ({
mode,
usePortal,
maxDate,
Expand Down
4 changes: 2 additions & 2 deletions src/components/DateTimeInput/DateTimeSelector.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import React, { useState } from "react";
import { Meta, Story } from "@storybook/react";
import { Meta, StoryFn } from "@storybook/react";
import { DateTime } from "luxon";

import { DateTimeSelectorProps } from "./DateTimeInput.types";
Expand All @@ -28,7 +28,7 @@ export default {
argTypes: {},
} as Meta<typeof DateTimeSelector>;

const Template: Story<DateTimeSelectorProps> = ({
const Template: StoryFn<DateTimeSelectorProps> = ({
mode,
id,
usePortal,
Expand Down
4 changes: 2 additions & 2 deletions src/components/DropdownSelector/DropdownSelector.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import React from "react";
import { Meta, Story } from "@storybook/react";
import { Meta, StoryFn } from "@storybook/react";
import { useState } from "@storybook/addons";

import DropdownSelector from "./";
Expand All @@ -31,7 +31,7 @@ export default {
argTypes: {},
} as Meta<typeof DropdownSelector>;

const Template: Story<DropdownSelectorProps> = (args) => {
const Template: StoryFn<DropdownSelectorProps> = (args) => {
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
const openDownloadMenu = Boolean(anchorEl);

Expand Down
4 changes: 2 additions & 2 deletions src/components/ExpandMenu/ExpandMenu.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import React, { Fragment, useState } from "react";
import { Meta, Story } from "@storybook/react";
import { Meta, StoryFn } from "@storybook/react";

import { ExpandMenuProps } from "./ExpandMenu.types";
import ExpandMenuOption from "./ExpandMenuOption";
Expand All @@ -36,7 +36,7 @@ export default {
argTypes: {},
} as Meta<typeof ExpandMenu>;

const Template: Story<ExpandMenuProps> = (args) => {
const Template: StoryFn<ExpandMenuProps> = (args) => {
const [open, setOpen] = useState<boolean>(false);

const extraArgs = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import React from "react";
import { Meta, Story } from "@storybook/react";
import { Meta, StoryFn } from "@storybook/react";
import { useState } from "@storybook/addons";

import ExpandOptionsButton from "./";
Expand All @@ -30,7 +30,7 @@ export default {
argTypes: {},
} as Meta<typeof ExpandOptionsButton>;

const Template: Story<ExpandOptionsButtonProps> = (args) => {
const Template: StoryFn<ExpandOptionsButtonProps> = (args) => {
const [open, setOpen] = useState<boolean>(false);

const extraArgs = {
Expand Down
4 changes: 2 additions & 2 deletions src/components/FileSelector/FileSelector.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import React from "react";
import { Meta, Story } from "@storybook/react";
import { Meta, StoryFn } from "@storybook/react";
import { useState } from "@storybook/addons";

import FileSelector from "./";
Expand All @@ -29,7 +29,7 @@ export default {
argTypes: {},
} as Meta<typeof FileSelector>;

const Template: Story<FileSelectorProps> = ({
const Template: StoryFn<FileSelectorProps> = ({
label,
required,
disabled,
Expand Down
4 changes: 2 additions & 2 deletions src/components/FormActionsTray/FormActionsTray.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.

import React from "react";
import { Meta, Story } from "@storybook/react";
import { Meta, StoryFn } from "@storybook/react";

import { FormActionsTrayProps } from "./FormActionsTray.types";
import StoryThemeProvider from "../../utils/StoryThemeProvider";
Expand All @@ -29,7 +29,7 @@ export default {
argTypes: {},
} as Meta<typeof FormActionsTray>;

const Template: Story<FormActionsTrayProps> = (args) => (
const Template: StoryFn<FormActionsTrayProps> = (args) => (
<StoryThemeProvider>
<GlobalStyles />
<FormActionsTray {...args}>
Expand Down
Loading

0 comments on commit da88329

Please sign in to comment.