mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-21 02:19:59 +08:00
367a20c525
* Set the chromatic parameters on Label's stories to test it in different viewports * Make the mock text longer
38 lines
661 B
Svelte
38 lines
661 B
Svelte
<script context="module">
|
|
import { Template, Story } from "@storybook/addon-svelte-csf";
|
|
import { allModes } from "../storybook/modes";
|
|
import Label from "./Index.svelte";
|
|
|
|
export const meta = {
|
|
title: "Components/Label",
|
|
component: Label,
|
|
parameters: {
|
|
chromatic: {
|
|
modes: {
|
|
desktop: allModes["desktop"],
|
|
mobile: allModes["mobile"]
|
|
}
|
|
}
|
|
}
|
|
};
|
|
</script>
|
|
|
|
<Template let:args>
|
|
<Label {...args} />
|
|
</Template>
|
|
|
|
<Story
|
|
name="Long and space-separated label text"
|
|
args={{
|
|
value: {
|
|
label: "Label",
|
|
confidences: [
|
|
{
|
|
label: "Long space separated label text, ".repeat(10),
|
|
confidence: 0.8
|
|
}
|
|
]
|
|
}
|
|
}}
|
|
/>
|