mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-24 10:54:04 +08:00
39 lines
661 B
Svelte
39 lines
661 B
Svelte
|
<script context="module">
|
||
|
import { Template, Story } from "@storybook/addon-svelte-csf";
|
||
|
import PlotComponent from "./Index.svelte";
|
||
|
import { allModes } from "../storybook/modes";
|
||
|
import { test_plot } from "./testplot";
|
||
|
|
||
|
export const meta = {
|
||
|
title: "Components/Plot",
|
||
|
component: PlotComponent,
|
||
|
parameters: {
|
||
|
chromatic: {
|
||
|
modes: {
|
||
|
desktop: allModes["desktop"],
|
||
|
mobile: allModes["mobile"]
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
</script>
|
||
|
|
||
|
<Template let:args>
|
||
|
<PlotComponent value="Plot" {...args} />
|
||
|
</Template>
|
||
|
|
||
|
<Story
|
||
|
name="with value"
|
||
|
args={{
|
||
|
value: test_plot,
|
||
|
label: "Plot"
|
||
|
}}
|
||
|
/>
|
||
|
|
||
|
<Story
|
||
|
name="with no value"
|
||
|
args={{
|
||
|
label: "Plot"
|
||
|
}}
|
||
|
/>
|