mirror of
https://github.com/gradio-app/gradio.git
synced 2025-02-11 11:19:58 +08:00
* file * file downlaod * add changeset * added story * lint * fix test * add changeset * margin * fixes * lint * modify * lint * add changeset * revert * revert * add changeset * Delete Chatbot.stories.svelte * revert * revert * add changeset * redesign * lint * fixes --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
46 lines
754 B
Svelte
46 lines
754 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="Default"
|
|
args={{
|
|
value: [
|
|
{
|
|
name: "groot.jpg",
|
|
data: "https://i.ibb.co/6BgKdSj/groot.jpg",
|
|
size: 10000
|
|
}
|
|
]
|
|
}}
|
|
/>
|
|
<Story
|
|
name="With height set to 80px"
|
|
args={{
|
|
value: Array(10).fill({
|
|
name: "groot.jpg",
|
|
data: "https://i.ibb.co/6BgKdSj/groot.jpg",
|
|
size: 10000
|
|
}),
|
|
height: 80
|
|
}}
|
|
/>
|