Skip to content

Commit e28ca97

Browse files
committed
update storybook scenario
1 parent f6db135 commit e28ca97

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

packages/components/src/components/Checkbox/Checkbox.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const Default: Story = {
2121
args: {
2222
children: 'Checkbox',
2323
disabled: false,
24+
checked: true,
2425
},
2526
}
2627

packages/components/src/components/CheckboxLayer/CheckboxLayer.stories.tsx

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,25 @@ const meta: Meta<typeof CheckboxLayer> = {
88
title: 'Devfive/CheckboxLayer',
99
component: CheckboxLayer,
1010
decorators: [
11-
(Story) => (
12-
<div style={{ padding: '20px' }}>
13-
<Story />
14-
</div>
15-
),
11+
(Story, context) => {
12+
const theme =
13+
context.parameters.theme || context.globals.theme || 'default'
14+
const isDark = theme === 'dark'
15+
16+
return (
17+
<div
18+
data-theme={theme}
19+
style={{
20+
padding: '20px',
21+
backgroundColor: isDark ? '#1a1a1a' : '#ffffff',
22+
color: isDark ? '#ffffff' : '#000000',
23+
minHeight: '200px',
24+
}}
25+
>
26+
<Story />
27+
</div>
28+
)
29+
},
1630
],
1731
argTypes: {
1832
onCheckboxChange: { action: 'checkbox changed' },

0 commit comments

Comments
 (0)