2022-04-07 17:26:47 +00:00
|
|
|
import { SquiggleEditor } from "../components/SquiggleEditor";
|
2022-03-30 10:39:32 +00:00
|
|
|
import { Canvas, Meta, Story, Props } from "@storybook/addon-docs";
|
|
|
|
|
|
|
|
<Meta title="Squiggle/SquiggleEditor" component={SquiggleEditor} />
|
|
|
|
|
|
|
|
export const Template = (props) => <SquiggleEditor {...props} />;
|
|
|
|
|
|
|
|
# Squiggle Editor
|
|
|
|
|
|
|
|
Squiggle Editor is a Squiggle chart with a text editor included for changing
|
|
|
|
the distribution.
|
|
|
|
|
|
|
|
<Canvas>
|
|
|
|
<Story
|
|
|
|
name="Normal"
|
|
|
|
args={{
|
2022-06-24 03:43:30 +00:00
|
|
|
squiggleString: "normal(5,2)",
|
2022-03-30 10:39:32 +00:00
|
|
|
}}
|
|
|
|
>
|
|
|
|
{Template.bind({})}
|
|
|
|
</Story>
|
|
|
|
</Canvas>
|
2022-04-06 01:18:18 +00:00
|
|
|
|
|
|
|
You can also name variables like so:
|
|
|
|
|
|
|
|
<Canvas>
|
|
|
|
<Story
|
|
|
|
name="Variables"
|
|
|
|
args={{
|
2022-06-24 03:43:30 +00:00
|
|
|
squiggleString: "x = 2\nnormal(x,2)",
|
2022-04-06 01:18:18 +00:00
|
|
|
}}
|
|
|
|
>
|
|
|
|
{Template.bind({})}
|
|
|
|
</Story>
|
|
|
|
</Canvas>
|