StoryBook: Fully support themes in pop-up components
This commit is contained in:
parent
6a9d8b86d8
commit
0fc178d887
4 changed files with 71 additions and 11 deletions
|
@ -5,6 +5,7 @@ import classnames from 'classnames';
|
|||
import * as styles from './styles.scss';
|
||||
import messages from '../_locales/en/messages.json';
|
||||
import { I18n } from '../sticker-creator/util/i18n';
|
||||
import { ThemedProvider } from '../ts/components/PopperRootContext';
|
||||
|
||||
addDecorator(withKnobs);
|
||||
|
||||
|
@ -14,9 +15,13 @@ addDecorator((storyFn /* , context */) => {
|
|||
return (
|
||||
<div className={styles.container}>
|
||||
<div className={styles.panel}>{contents}</div>
|
||||
<div className={classnames(styles.darkTheme, styles.panel, 'dark-theme')}>
|
||||
{contents}
|
||||
</div>
|
||||
<ThemedProvider themes={['dark']}>
|
||||
<div
|
||||
className={classnames(styles.darkTheme, styles.panel, 'dark-theme')}
|
||||
>
|
||||
{contents}
|
||||
</div>
|
||||
</ThemedProvider>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue