Skip to content

Commit

Permalink
Merge pull request #17679 from storybookjs/norbert/ch-1636-storybook-…
Browse files Browse the repository at this point in the history
…composition-ref-is-shown-when

UI: Fix composition support in safari
  • Loading branch information
shilman committed Apr 1, 2022
1 parent 813088d commit 41d35ce
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/ui/src/components/preview/FramesRenderer.tsx
Expand Up @@ -17,7 +17,6 @@ const getActive = (refId: FramesRendererProps['refId']) => {
const SkipToSidebarLink = styled(Button)(({ theme }) => ({
display: 'none',
'@media (min-width: 600px)': {
display: 'block',
position: 'absolute',
top: 10,
right: 15,
Expand Down Expand Up @@ -55,12 +54,13 @@ export const FramesRenderer: FunctionComponent<FramesRendererProps> = ({
const active = getActive(refId);

const styles = useMemo<CSSObject>(() => {
// add #root to make the selector high enough in specificity
return {
'[data-is-storybook="false"]': {
visibility: 'hidden',
'#root [data-is-storybook="false"]': {
display: 'none',
},
'[data-is-storybook="true"]': {
visibility: 'visible',
'#root [data-is-storybook="true"]': {
display: 'block',
},
};
}, []);
Expand Down

0 comments on commit 41d35ce

Please sign in to comment.