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

Move active check out of the kind condition #49

Merged
merged 2 commits into from
Mar 15, 2019

Conversation

Landerson352
Copy link
Contributor

https://github.com/storybooks/addon-jsx/pull/45/files Added an active prop check but placed it inside the condition which conditionally renders based on the kind of component. As a result, the disabled "Copy" button renders on all other add-on tabs, where addon-jsx is "inactive", as seen below:

image

This change moves the active prop check out to the beginning of the render() method, where it can return null appropriately.

https://github.com/storybooks/addon-jsx/pull/45/files Added an `active` prop check but placed it inside the condition which conditionally renders based on the kind of component. As a result, the disabled "Copy" button renders on all other add-on tabs, where JSX is "inactive".
@hipstersmoothie hipstersmoothie merged commit a98e2f4 into storybookjs:master Mar 15, 2019
@hipstersmoothie hipstersmoothie added the patch Increment the patch version when merged label Mar 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Increment the patch version when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants