diff --git a/.changeset/gentle-grapes-remain.md b/.changeset/gentle-grapes-remain.md new file mode 100644 index 000000000..0616bf555 --- /dev/null +++ b/.changeset/gentle-grapes-remain.md @@ -0,0 +1,8 @@ +--- +'@westpac/ui': minor +'protoform': patch +'site': patch +'@westpac/eslint-config': patch +--- + +bottom sheet fix diff --git a/packages/ui/.storybook/preview.tsx b/packages/ui/.storybook/preview.tsx index afe14d42d..3746e9bce 100644 --- a/packages/ui/.storybook/preview.tsx +++ b/packages/ui/.storybook/preview.tsx @@ -2,12 +2,19 @@ import type { Preview } from '@storybook/react'; import './global.css'; import * as React from 'react'; import { clsx } from 'clsx'; +import { useEffect } from 'react'; const withThemeProvider = (Story, context) => { const theme = context.globals?.theme || 'WBC'; + // workaround for modal + useEffect(() => { + if (typeof window !== 'undefined') { + document.querySelector('html')?.setAttribute('data-theme', theme.toLowerCase()); + } + }, [theme]); // Note: Not using padding for grid demos as it affects the proper grid visuals i.e. breakpoints, paddings, margins etc. return ( -