src/frontend/components/app/render-code/Stories.tsx
/* eslint-disable react/function-component-definition */
import type { Story } from "@storybook/react";
import { TestProviders } from "@/tests/Provider";
import type { IProps } from ".";
import { RenderCode } from ".";
export default {
title: "Components/RenderCode",
component: RenderCode,
args: {
input: {
hello: {
there: "how are you",
},
foo: ["bar", "baz", "bax"],
},
},
};
const Template: Story<IProps> = (args) => {
return (
<TestProviders>
<RenderCode {...args} />
</TestProviders>
);
};
export const JavascriptObject = Template.bind({});
JavascriptObject.args = {};
export const JavascriptScript = Template.bind({});
JavascriptScript.args = {
input: `
/*
Example
*/
const foo = () => {
return bar;
}
`,
};