0b4f918208
* chore: switch theme to zustand, delete context * chore: switch apps/componenets to consume the hook * chore: update storybook theme usage to use documentElement * chore: dry up theme switcher listener for storybooks * feat: optional theme param to allow toggling * chore: add additional check for matchMedia function * chore: change block explorer test to use light theme as its the default * chore: remove unused headerprops for multisig-signer * chore: remove unused props from theme switcher component * chore: dry up validateTheme func * chore: remove unused props from explorer header test * chore: use new theme switcher in account history container
27 lines
570 B
JavaScript
27 lines
570 B
JavaScript
import './styles.css';
|
|
import { useStorybookThemeObserver } from '@vegaprotocol/react-helpers';
|
|
|
|
export const parameters = {
|
|
actions: { argTypesRegex: '^on[A-Z].*' },
|
|
backgrounds: { disable: true },
|
|
themes: {
|
|
default: 'dark',
|
|
list: [
|
|
{ name: 'dark', class: ['dark', 'bg-black'], color: '#000' },
|
|
{ name: 'light', class: '', color: '#FFF' },
|
|
],
|
|
},
|
|
};
|
|
|
|
export const decorators = [
|
|
(Story) => {
|
|
useStorybookThemeObserver();
|
|
|
|
return (
|
|
<div style={{ width: '100%', height: 500 }}>
|
|
<Story />
|
|
</div>
|
|
);
|
|
},
|
|
];
|