Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the viewport addon compatible with composition. #20289

Merged
merged 1 commit into from
Dec 15, 2022
Merged

Make the viewport addon compatible with composition. #20289

merged 1 commit into from
Dec 15, 2022

Conversation

jpzwarte
Copy link
Member

So the current viewport addon uses the hardcoded DOM id of the preview iframe for changing the size: #storybook-preview-iframe. This means it will never change the size of any ref iframes. This PR fixes that by changing the selector to iframe[data-is-storybook="true"].

With help from @ndelangen :)

@ndelangen
Copy link
Member

This adds proper composition support for addon-viewport!

@ndelangen ndelangen merged commit ba75532 into storybookjs:next Dec 15, 2022
@jpzwarte jpzwarte deleted the fix/viewport-addon-with-composition branch December 15, 2022 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants