mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-05 08:01:20 +08:00
Make the viewport addon compatible with composition.
This commit is contained in:
parent
970fc0d841
commit
4623dd7283
@ -58,7 +58,6 @@ const toLinks = memoize(50)((list: ViewportItem[], active: LinkBase, set, state,
|
||||
.filter(Boolean);
|
||||
});
|
||||
|
||||
const iframeId = 'storybook-preview-iframe';
|
||||
const wrapperId = 'storybook-preview-wrapper';
|
||||
|
||||
interface LinkBase {
|
||||
@ -208,7 +207,7 @@ export const ViewportTool: FC = memo(
|
||||
<ActiveViewportSize>
|
||||
<Global
|
||||
styles={{
|
||||
[`#${iframeId}`]: {
|
||||
[`iframe[data-is-storybook="true"]`]: {
|
||||
margin: `auto`,
|
||||
transition: 'width .3s, height .3s',
|
||||
position: 'relative',
|
||||
|
Loading…
x
Reference in New Issue
Block a user