mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21: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,24 +0,0 @@
|
|||
<script>
|
||||
export let story = undefined;
|
||||
|
||||
import Pagination from "./Pagination.svelte";
|
||||
import PaginationSkeleton from "./Pagination.Skeleton.svelte";
|
||||
</script>
|
||||
|
||||
<div style="width: 800px;">
|
||||
{#if story === 'multiple'}
|
||||
<Pagination {...$$props}>Pagination</Pagination>
|
||||
<Pagination {...$$props}>Pagination</Pagination>
|
||||
{:else if story === 'skeleton'}
|
||||
<PaginationSkeleton />
|
||||
{:else}
|
||||
<Pagination
|
||||
{...$$props}
|
||||
on:update="{({ detail }) => {
|
||||
console.log(detail);
|
||||
}}"
|
||||
>
|
||||
Pagination
|
||||
</Pagination>
|
||||
{/if}
|
||||
</div>
|
|
@ -1,77 +0,0 @@
|
|||
import {
|
||||
withKnobs,
|
||||
text,
|
||||
number,
|
||||
boolean,
|
||||
array,
|
||||
} from "@storybook/addon-knobs";
|
||||
import Component from "./Pagination.Story.svelte";
|
||||
|
||||
export default { title: "Pagination", decorators: [withKnobs] };
|
||||
|
||||
export const Default = () => ({
|
||||
Component,
|
||||
props: {
|
||||
disabled: boolean("Disable backward/forward buttons (disabled)", false),
|
||||
page: number("The current page (page)", 1),
|
||||
totalItems: number("Total number of items (totalItems)", 103),
|
||||
pagesUnknown: boolean(
|
||||
"Total number of items unknown (pagesUnknown)",
|
||||
false
|
||||
),
|
||||
pageInputDisabled: boolean("Disable page input (pageInputDisabled)", false),
|
||||
pageSizeInputDisabled: boolean(
|
||||
"Disable page size input (pageSizeInputDisabled)",
|
||||
false
|
||||
),
|
||||
backwardText: text(
|
||||
"The description for the backward icon (backwardText)",
|
||||
"Previous page"
|
||||
),
|
||||
forwardText: text(
|
||||
"The description for the forward icon (forwardText)",
|
||||
"Next page"
|
||||
),
|
||||
pageSize: number("Number of items per page (pageSize)", 10),
|
||||
pageSizes: array("Choices of `pageSize` (pageSizes)", [10, 20, 30, 40, 50]),
|
||||
itemsPerPageText: text(
|
||||
"Label for `pageSizes` select UI (itemsPerPageText)",
|
||||
"Items per page:"
|
||||
),
|
||||
},
|
||||
});
|
||||
|
||||
export const Multiple = () => ({
|
||||
Component,
|
||||
props: {
|
||||
story: "multiple",
|
||||
disabled: boolean("Disable backward/forward buttons (disabled)", false),
|
||||
page: number("The current page (page)", 1),
|
||||
totalItems: number("Total number of items (totalItems)", 103),
|
||||
pagesUnknown: boolean(
|
||||
"Total number of items unknown (pagesUnknown)",
|
||||
false
|
||||
),
|
||||
pageInputDisabled: boolean("Disable page input (pageInputDisabled)", false),
|
||||
pageSizeInputDisabled: boolean(
|
||||
"Disable page size input (pageSizeInputDisabled)",
|
||||
false
|
||||
),
|
||||
backwardText: text(
|
||||
"The description for the backward icon (backwardText)",
|
||||
"Previous page"
|
||||
),
|
||||
forwardText: text(
|
||||
"The description for the forward icon (forwardText)",
|
||||
"Next page"
|
||||
),
|
||||
pageSize: number("Number of items per page (pageSize)", 10),
|
||||
pageSizes: array("Choices of `pageSize` (pageSizes)", [10, 20, 30, 40, 50]),
|
||||
itemsPerPageText: text(
|
||||
"Label for `pageSizes` select UI (itemsPerPageText)",
|
||||
"Items per page:"
|
||||
),
|
||||
},
|
||||
});
|
||||
|
||||
export const Skeleton = () => ({ Component, props: { story: "skeleton" } });
|
Loading…
Add table
Add a link
Reference in a new issue