mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-27 02:30:17 +08:00
1419538ea7
* asd * changes * fix everything * cleanup * add changeset * fix casing * lockfile * fix casing * fix ci, enable linting * fix test * add changeset * add changeset * delete changeset * fix dirs * fix casing * fix notebooks * fix casing * fix casing * fix casing * fix casing * fix casing * fix casing * fix casing * fix casing --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
32 lines
772 B
Svelte
32 lines
772 B
Svelte
<script>
|
|
import { Meta, Template, Story } from "@storybook/addon-svelte-csf";
|
|
import HighlightedText from "./static";
|
|
</script>
|
|
|
|
<Meta title="Components/HighlightedText" component={HighlightedText} />
|
|
|
|
<Template let:args>
|
|
<HighlightedText
|
|
value={[
|
|
["zebras", "+"],
|
|
["dogs", "-"],
|
|
["elephants", "+"]
|
|
]}
|
|
{...args}
|
|
/>
|
|
</Template>
|
|
|
|
<Story name="Highlighted Text" />
|
|
<Story name="Highlighted Text with legend" args={{ show_legend: true }} />
|
|
<Story name="Highlighted Text with label" args={{ label: "animals" }} />
|
|
<Story
|
|
name="Highlighted Text with new lines"
|
|
args={{
|
|
value: [["zebras", "+"], ["\n"], ["dogs", "-"], ["\n"], ["elephants", "+"]]
|
|
}}
|
|
/>
|
|
<Story
|
|
name="Highlighted Text with color map"
|
|
args={{ color_map: { "+": "green", "-": "red" } }}
|
|
/>
|