mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 02:41:05 +00:00
chore: remove storybook
This commit is contained in:
parent
856086dc71
commit
378fe06e03
116 changed files with 103 additions and 14249 deletions
|
@ -1,34 +0,0 @@
|
|||
<script>
|
||||
export let story = undefined;
|
||||
|
||||
import Select from "./Select.svelte";
|
||||
import SelectItem from "./SelectItem.svelte";
|
||||
import SelectSkeleton from "./Select.Skeleton.svelte";
|
||||
import SelectItemGroup from "./SelectItemGroup.svelte";
|
||||
|
||||
$: selected = "placeholder-item";
|
||||
$: console.log(selected);
|
||||
</script>
|
||||
|
||||
<div>
|
||||
{#if story === 'skeleton'}
|
||||
<SelectSkeleton {...$$props} />
|
||||
{:else}
|
||||
<Select {...$$props.select} id="select-id" name="select-name" bind:selected>
|
||||
<SelectItem
|
||||
value="placeholder-item"
|
||||
text="Choose an option"
|
||||
disabled
|
||||
hidden
|
||||
/>
|
||||
<SelectItemGroup {...$$props.group} label="Category 1">
|
||||
<SelectItem value="option-1" text="Option 1" />
|
||||
<SelectItem value="option-2" text="Option 2" />
|
||||
</SelectItemGroup>
|
||||
<SelectItemGroup {...$$props.group} label="Category 2">
|
||||
<SelectItem value="option-3" text="Option 3" />
|
||||
<SelectItem value="option-4" text="Option 4" />
|
||||
</SelectItemGroup>
|
||||
</Select>
|
||||
{/if}
|
||||
</div>
|
|
@ -1,46 +0,0 @@
|
|||
import { withKnobs, text, boolean, select } from "@storybook/addon-knobs";
|
||||
import Component from "./Select.Story.svelte";
|
||||
|
||||
export default { title: "Select", decorators: [withKnobs] };
|
||||
|
||||
const sizes = {
|
||||
"Extra large size (xl)": "xl",
|
||||
"Default size": undefined,
|
||||
"Small size (sm)": "sm",
|
||||
};
|
||||
|
||||
export const Default = () => ({
|
||||
Component,
|
||||
props: {
|
||||
select: {
|
||||
size: select("Field size (size)", sizes, undefined) || undefined,
|
||||
light: boolean("Light variant (light in <Select>)", false),
|
||||
inline: boolean(
|
||||
"Put control in-line with label (inline in <Select>)",
|
||||
false
|
||||
),
|
||||
disabled: boolean("Disabled (disabled in <Select>)", false),
|
||||
hideLabel: boolean("No label (hideLabel in <Select>)", false),
|
||||
invalid: boolean("Show form validation UI (invalid in <Select>)", false),
|
||||
invalidText: text(
|
||||
"Form validation UI content (invalidText in <Select>)",
|
||||
"A valid value is required"
|
||||
),
|
||||
labelText: text("Label text (helperText)", "Select"),
|
||||
helperText: text("Helper text (helperText)", "Optional helper text here"),
|
||||
id: text("Select id", "select-id"),
|
||||
name: text("Select name", "select-name"),
|
||||
},
|
||||
group: {
|
||||
disabled: boolean("Disabled (disabled in <SelectItemGroup>)", false),
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const Skeleton = () => ({
|
||||
Component,
|
||||
props: {
|
||||
story: "skeleton",
|
||||
hideLabel: boolean("No label (hideLabel in <Select>)", false),
|
||||
},
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue