Skip to content

Commit b8b1155

Browse files
committed
bugfix in the story
Signed-off-by: Maximilian Inckmann <[email protected]>
1 parent 298afb3 commit b8b1155

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

packages/stencil-library/.storybook/preview.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ export default {
3232
// runOnly: ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'best-practice', 'wcag2aaa'],
3333
},
3434
},
35+
backgrounds: {
36+
options: {
37+
// 👇 Default options
38+
dark: { name: 'Dark', value: '#222' },
39+
light: { name: 'Light', value: '#F7F9F2' },
40+
},
41+
},
3542
controls: {
3643
matchers: {
3744
color: /(background|color)$/i,

packages/stencil-library/src/components/pid-component/pid-component.stories.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -436,10 +436,11 @@ export const DarkMode: Story = {
436436
args: {
437437
value: '21.11152/B88E78D4-E1EE-40F7-96CE-EC1AFCFF6343',
438438
darkMode: 'dark',
439-
openByDefault: true,
439+
},
440+
globals: {
441+
backgrounds: { value: 'dark' },
440442
},
441443
parameters: {
442-
backgrounds: { default: 'dark' },
443444
docs: {
444445
source: {
445446
code: `
@@ -457,10 +458,11 @@ export const LightMode: Story = {
457458
args: {
458459
value: '21.11152/B88E78D4-E1EE-40F7-96CE-EC1AFCFF6343',
459460
darkMode: 'light',
460-
openByDefault: true,
461+
},
462+
globals: {
463+
backgrounds: { value: 'light' },
461464
},
462465
parameters: {
463-
backgrounds: { default: 'light' },
464466
docs: {
465467
source: {
466468
code: `
@@ -478,7 +480,6 @@ export const SystemMode: Story = {
478480
args: {
479481
value: '21.11152/B88E78D4-E1EE-40F7-96CE-EC1AFCFF6343',
480482
darkMode: 'system',
481-
openByDefault: true,
482483
},
483484
parameters: {
484485
docs: {

0 commit comments

Comments
 (0)