mirror of
https://github.com/gradio-app/gradio.git
synced 2024-11-21 01:01:05 +08:00
053bec98be
* remove width and heights from icons * add changeset * add global css vars (light) * add changeset * add changeset * Remove component stories (will document these elsewhere) * remove rtl param in chatbot story for non rtl text * formatting * remove redundant class * add changeset * fix row story * fix broken groot file stories * revert lock changes * add changeset * lockfile * pnpm lock * remove colour from webcam icons * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
48 lines
917 B
Svelte
48 lines
917 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: "cheetah.jpg",
|
|
orig_name: "cheetah.jpg",
|
|
url: "https://gradio-builds.s3.amazonaws.com/demo-files/ghepardo-primo-piano.jpg",
|
|
size: 10000
|
|
}
|
|
]
|
|
}}
|
|
/>
|
|
<Story
|
|
name="Multiple files, with height set to 150px"
|
|
args={{
|
|
value: Array(10).fill({
|
|
path: "cheetah.jpg",
|
|
orig_name: "cheetah.jpg",
|
|
url: "https://gradio-builds.s3.amazonaws.com/demo-files/ghepardo-primo-piano.jpg",
|
|
size: 10000
|
|
}),
|
|
height: 150
|
|
}}
|
|
/>
|