mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11: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,48 +0,0 @@
|
|||
<script>
|
||||
export let story = undefined;
|
||||
|
||||
import Checkbox from "./Checkbox.svelte";
|
||||
import CheckboxSkeleton from "./Checkbox.Skeleton.svelte";
|
||||
|
||||
const {
|
||||
labelText,
|
||||
indeterminate,
|
||||
disabled,
|
||||
hideLabel,
|
||||
wrapperClassName,
|
||||
} = $$props;
|
||||
const checkboxProps = {
|
||||
labelText,
|
||||
indeterminate,
|
||||
disabled,
|
||||
hideLabel,
|
||||
wrapperClassName,
|
||||
};
|
||||
|
||||
let checked = true;
|
||||
</script>
|
||||
|
||||
{#if story === 'skeleton'}
|
||||
<div>
|
||||
<CheckboxSkeleton />
|
||||
</div>
|
||||
{:else if story === 'unchecked'}
|
||||
<fieldset class="bx--fieldset">
|
||||
<legend class="bx--label">Checkbox heading</legend>
|
||||
<Checkbox {...checkboxProps} id="checkbox-label-1" />
|
||||
<Checkbox {...checkboxProps} id="checkbox-label-2" />
|
||||
</fieldset>
|
||||
{:else}
|
||||
<fieldset class="bx--fieldset">
|
||||
<legend class="bx--label">Checkbox heading</legend>
|
||||
<Checkbox
|
||||
{...checkboxProps}
|
||||
id="checkbox-label-1"
|
||||
bind:checked
|
||||
on:check="{({ detail }) => {
|
||||
console.log('on:check', detail);
|
||||
}}"
|
||||
/>
|
||||
<Checkbox {...checkboxProps} id="checkbox-label-2" checked />
|
||||
</fieldset>
|
||||
{/if}
|
|
@ -1,27 +0,0 @@
|
|||
import { withKnobs, boolean, text } from "@storybook/addon-knobs";
|
||||
import Component from "./Checkbox.Story.svelte";
|
||||
|
||||
export default { title: "Checkbox", decorators: [withKnobs] };
|
||||
|
||||
export const Checked = () => ({
|
||||
Component,
|
||||
props: {
|
||||
labelText: text("Label text (labelText)", "Checkbox label"),
|
||||
indeterminate: boolean("Intermediate (indeterminate)", false),
|
||||
disabled: boolean("Disabled (disabled)", false),
|
||||
hideLabel: boolean("Hide label (hideLabel)", false),
|
||||
},
|
||||
});
|
||||
|
||||
export const Unchecked = () => ({
|
||||
Component,
|
||||
props: {
|
||||
story: "unchecked",
|
||||
labelText: text("Label text (labelText)", "Checkbox label"),
|
||||
indeterminate: boolean("Intermediate (indeterminate)", false),
|
||||
disabled: boolean("Disabled (disabled)", false),
|
||||
hideLabel: boolean("Hide label (hideLabel)", false),
|
||||
},
|
||||
});
|
||||
|
||||
export const Skeleton = () => ({ Component, props: { story: "skeleton" } });
|
Loading…
Add table
Add a link
Reference in a new issue