fix(datatable-skeleton): add showHeader, showToolbar props

fixes #264
This commit is contained in:
Eric Liu 2020-09-19 05:58:50 -07:00
commit e2c39def42
2 changed files with 66 additions and 32 deletions

View file

@ -1,4 +1,4 @@
import { withKnobs, array, boolean } from "@storybook/addon-knobs";
import { withKnobs, array, boolean, number } from "@storybook/addon-knobs";
import Component from "./DataTableSkeleton.Story.svelte";
export default { title: "DataTableSkeleton", decorators: [withKnobs] };
@ -6,12 +6,16 @@ export default { title: "DataTableSkeleton", decorators: [withKnobs] };
export const Default = () => ({
Component,
props: {
columns: number("Number of columns", 5),
rows: number("Number of rows", 5),
zebra: boolean("Use zebra stripe (zebra)", false),
compact: boolean("Compact variant (compact)", false),
showHeader: boolean("Show header", true),
headers: array(
"Optional table headers (headers)",
["Name", "Protocol", "Port", "Rule", "Attached Groups"],
","
),
zebra: boolean("Use zebra stripe (zebra)", false),
compact: boolean("Compact variant (compact)", false),
showToolbar: boolean("Show toolbar", true),
},
});