gradio/js/file/File.stories.svelte
Abubakar Abid f344592aeb
Allows setting a height to gr.File and improves the UI of the component (#5221)
* 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>
2023-08-17 18:43:12 -07:00

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
}}
/>