Skip to content

Hide controls if they are disabled using the built-in includeConditionalArg functoin #714

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

Merged

Conversation

daviegourevitch
Copy link
Contributor

Issue: #711

What I did

I call the pre-existing function includeConditionalArg for each arg in on-device-controls and only render them if their condition is met.

How to test

I added a story to the example storybook called HiddenControls that lets you test the normal use-case of having "advanced" controls

@dannyhw
Copy link
Member

dannyhw commented Apr 16, 2025

Hey this looks good, thanks for the pr 🙏 . Unfortunately I'm a bit unavailable for about a week so I'm not able to fully test but I really appreciate it.

I will get this tested and merged as soon as I can.

@daviegourevitch
Copy link
Contributor Author

Perfect, thanks so much!

@dannyhw
Copy link
Member

dannyhw commented Apr 26, 2025

made a slight adjustment to get the value from a function call

@dannyhw dannyhw merged commit ec36808 into storybookjs:next Apr 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants