gradio/js/file/File.stories.svelte
Abubakar Abid 185f9aa156
Fix stories (#6244)
* format

* audio

* more stories
2023-11-02 12:10:11 +00:00

48 lines
829 B
Svelte

<script>
import { Meta, Template, Story } from "@storybook/addon-svelte-csf";
import FilePreview from "./shared/FilePreview.svelte";
</script>
<Meta
title="Components/File"
component={FilePreview}
argTypes={{
value: {
control: "text",
description: "The URL or filepath (or list of URLs or filepaths)",
name: "value",
value: []
}
}}
/>
<Template let:args>
<FilePreview {...args} />
</Template>
<Story
name="Single File"
args={{
value: [
{
path: "groot.jpg",
orig_name: "groot.jpg",
url: "https://i.ibb.co/6BgKdSj/groot.jpg",
size: 10000
}
]
}}
/>
<Story
name="Multiple files, with height set to 150px"
args={{
value: Array(10).fill({
path: "groot.jpg",
orig_name: "groot.jpg",
url: "https://i.ibb.co/6BgKdSj/groot.jpg",
size: 10000
}),
height: 150
}}
/>