-
Notifications
You must be signed in to change notification settings - Fork 639
feat: Add disabled state to interactive UI example #3293
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3293 +/- ##
=======================================
Coverage 94.87% 94.87%
=======================================
Files 517 517
Lines 11333 11335 +2
Branches 1748 1749 +1
=======================================
+ Hits 10752 10754 +2
Misses 581 581 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
||
| export const InteractiveForm: SnapComponent = () => { | ||
| export const InteractiveForm: SnapComponent<{ disabled?: boolean }> = ({ | ||
| disabled, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just add a few disabled elements instead of a prop to disable everything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we want to show each component's disabled state, it would duplicate a lot to introduce each component in its disabled state too 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO it is neat that we can test the submit button being disabled too, would be kinda hard without a disabled state
Makes a couple of improvements to the interactive UI example Snap:
disabledparameter which disables all of the components for testing and visual inspection