Skip to content

Commit 6a9efd1

Browse files
Categorize stories in Common, Widgets and Other (#286)
* Update Storybook documentation about passing icon as prop * Add custom code example to banner
1 parent f7c7d39 commit 6a9efd1

22 files changed

Lines changed: 67 additions & 22 deletions

File tree

design-library/.storybook/preview.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const preview = {
1515
parameters: {
1616
options: {
1717
storySort: {
18-
order: ['Introduction', 'Tokens', 'Forms', 'Components', '*'],
18+
order: ['Introduction', 'Tokens', 'Forms', 'Common', 'Widgets', '*'],
1919
},
2020
},
2121
docs: {

design-library/scripts/create-component.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async function createStoryFile(componentName) {
6565
import type { Meta, StoryFn } from "@storybook/vue3";
6666
6767
export default {
68-
title: "Components/${componentName}",
68+
title: "Other/${componentName}",
6969
component: ${componentName},
7070
argTypes: {
7171

design-library/src/components/BccAlert/BccAlert.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type { Meta, StoryFn } from "@storybook/vue3";
55
import { Face2Icon } from "@bcc-code/icons-vue";
66

77
export default {
8-
title: "Components/BccAlert",
8+
title: "Common/BccAlert",
99
component: BccAlert,
1010
argTypes: {
1111
context: {

design-library/src/components/BccAvatar/BccAvatar.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import BccAvatar from "./BccAvatar.vue";
33
import type { Meta, StoryFn } from "@storybook/vue3";
44

55
export default {
6-
title: "Components/BccAvatar",
6+
title: "Other/BccAvatar",
77
component: BccAvatar,
88
argTypes: {
99
gender: {

design-library/src/components/BccBadge/BccBadge.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { Meta, StoryFn } from "@storybook/vue3";
77
* A badge component to be used for informational text, like "new" or "recommended". See the `BccPin` component for a differently styled version for numbers.
88
*/
99
export default {
10-
title: "Components/BccBadge",
10+
title: "Common/BccBadge",
1111
component: BccBadge,
1212
argTypes: {
1313
context: {

design-library/src/components/BccBanner/BccBanner.stories.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import BccBanner from "./BccBanner.vue";
88
import type { Meta, StoryFn } from "@storybook/vue3";
99

1010
export default {
11-
title: "Components/BccBanner",
11+
title: "Other/BccBanner",
1212
component: BccBanner,
1313
argTypes: {
1414
variant: {
@@ -76,3 +76,23 @@ Example.args = {
7676
},
7777
],
7878
};
79+
Example.parameters = {
80+
docs: {
81+
source: {
82+
language: "html",
83+
code: `
84+
<BccBanner
85+
:icon="BccFillIcon"
86+
title="Banner title"
87+
open
88+
closeOnAction
89+
@close="close"
90+
:actions="actions"
91+
>
92+
<small>SLOTTED CONTENT</small>
93+
<p>Welcome to the jungle. Hope you have fun!</p>
94+
</BccBanner>
95+
`,
96+
},
97+
},
98+
};

design-library/src/components/BccCapacityIndicator/BccCapacityIndicator.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type { Meta, StoryFn } from "@storybook/vue3";
66
* Show the remaining capacity, for example for activities. Pairs well with the `StatusIndicator` for more custom status states
77
*/
88
export default {
9-
title: "Components/BccCapacityIndicator",
9+
title: "Other/BccCapacityIndicator",
1010
component: BccCapacityIndicator,
1111
argTypes: {
1212
total: {

design-library/src/components/BccCookieBanner/BccCookieBanner.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { Meta, StoryFn } from "@storybook/vue3";
77
* A cookie banner with an accept and decline button. Emits `decline` and `accept` events when the buttons are clicked.
88
*/
99
export default {
10-
title: "Components/BccCookieBanner",
10+
title: "Other/BccCookieBanner",
1111
component: BccCookieBanner,
1212
argTypes: {
1313
showOverlay: {

design-library/src/components/BccGraphic/BccGraphic.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import BccGraphic from "./BccGraphic.vue";
33
import type { Meta, StoryFn } from "@storybook/vue3";
44

55
export default {
6-
title: "Components/BccGraphic",
6+
title: "Widgets/BccGraphic",
77
component: BccGraphic,
88
argTypes: {
99
rounding: {

design-library/src/components/BccHeader/BccHeader.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Face2Icon } from "@bcc-code/icons-vue";
33
import type { Meta, StoryFn } from "@storybook/vue3";
44

55
export default {
6-
title: "Components/BccHeader",
6+
title: "Widgets/BccHeader",
77
component: BccHeader,
88
argTypes: {},
99
} as Meta<typeof BccHeader>;

0 commit comments

Comments
 (0)