Skip to content

Commit

Permalink
Merge pull request #6042 from glitchperfect/patch-4
Browse files Browse the repository at this point in the history
fix (addon/backgrounds): addon panel doesn't hide
  • Loading branch information
shilman committed Mar 17, 2019
1 parent 9cf2866 commit 0033e3a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions addons/backgrounds/src/containers/BackgroundSelector.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component, Fragment } from 'react';
import memoize from 'memoizerific';

import { Global } from '@storybook/theming';
import { Global, Theme } from '@storybook/theming';

import { SET_STORIES } from '@storybook/core-events';

Expand Down Expand Up @@ -125,11 +125,14 @@ export class BackgroundSelector extends Component<BackgroundToolProps, Backgroun
<Fragment>
{selectedBackgroundColor ? (
<Global
styles={{
styles={(theme: Theme) => ({
[`#${iframeId}`]: {
background: selectedBackgroundColor,
background:
selectedBackgroundColor === 'transparent'
? theme.background.content
: selectedBackgroundColor,
},
}}
})}
/>
) : null}
<WithTooltip
Expand Down

0 comments on commit 0033e3a

Please sign in to comment.