Skip to content

Commit 7802bf4

Browse files
fixed storybook
1 parent 78b87f4 commit 7802bf4

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

source/library/components/py-config/py-config.story.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import type { Meta, StoryFn } from "@storybook/react";
2-
32
import PyScriptProvider from "~root/source/library/components/py-script-provider/py-script-provider";
4-
53
import PyConfig from "./py-config";
6-
74
import type { PyConfigProperties, PyConfigTag } from "./py-config.types";
85

96
export default {
107
component: PyConfig,
118
} as Meta<typeof PyConfig>;
129

10+
const pythonTestFile: string = "./test_file.py";
11+
1312
const Template: StoryFn<PyConfigTag> = <T extends object>({
1413
...rest
1514
}: PyConfigProperties<T>): JSX.Element => {
@@ -26,25 +25,27 @@ PyConfigExample.args = {
2625
type: "json",
2726
packages: new Set(["matplotlib", "numpy", "folium"]),
2827
plugins: new Set(["https://pyscript.net/latest/plugins/python/py_tutor.py"]),
29-
fetch: {
30-
files: new Set(["./test_file.py"]),
31-
},
28+
fetch: [
29+
{
30+
files: new Set([pythonTestFile]),
31+
},
32+
],
3233
};
3334

3435
export const PyConfigExternalJsonConfigExample: StoryFn<typeof PyConfig> =
3536
Template.bind({});
3637

3738
PyConfigExternalJsonConfigExample.args = {
3839
type: "json",
39-
source: "./test_file.py",
40+
source: pythonTestFile,
4041
};
4142

4243
export const PyConfigExternalTomlConfigExample: StoryFn<typeof PyConfig> =
4344
Template.bind({});
4445

4546
PyConfigExternalTomlConfigExample.args = {
4647
type: "toml",
47-
source: "./test_file.py",
48+
source: pythonTestFile,
4849
};
4950

5051
export const PyConfigTomlConfigExample: StoryFn<typeof PyConfig> =

0 commit comments

Comments
 (0)