We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e24d5e1 commit aedaaebCopy full SHA for aedaaeb
.storybook/preview.tsx
@@ -17,7 +17,7 @@ const preview: Preview = {
17
decorators: [
18
(Story, context) => {
19
const bgValue = context.globals?.backgrounds?.value;
20
- const isDark = getColorLuminance(bgValue) < 0.5;
+ const isDark = bgValue && getColorLuminance(bgValue) < 0.5;
21
return (
22
<AntdConfigProvider theme={{ algorithm: isDark ? theme.darkAlgorithm : theme.defaultAlgorithm }}>
23
<AntdApp>
0 commit comments