Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allows setting a height to
gr.File
and improves the UI of the compo…
…nent (#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>
- Loading branch information
1 parent
ddac7e4
commit f344592
Showing
12 changed files
with
101 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@gradio/file": minor | ||
"gradio": minor | ||
--- | ||
|
||
feat:Allows setting a height to `gr.File` and improves the UI of the component |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<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 | ||
}} | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters