-
Notifications
You must be signed in to change notification settings - Fork 371
feat(ExpandableSection): Allow more control over toggle icon #12051
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
base: main
Are you sure you want to change the base?
Conversation
Preview: https://pf-react-pr-12051.surge.sh A11y report: https://pf-react-pr-12051-a11y.surge.sh |
Allow for custom icons and disabled icons.
9849dc6
to
055efb6
Compare
/** Whether to show a toggle icon when variant is not truncated. */ | ||
hasToggleIcon?: boolean; |
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.
Not 100% about allowing the icon to totally be removed since it kinda removes the indication that you can click to expand/collapse something as well as its current state. If the toggle text updates based on the state + the text indicates somehow that it expands/collapses something, then less of an issue probably.
Maybe if we just have the prop description mention that if an icon is omitted, we recommend the toggle text to indicate the current state of the expandable section. Should we also get design sign off on this?
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.
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.
We can add an error? My concern is that the consumer asked for a way for consumers to provide their own custom icon directly as part of the toggle content.
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.
I think allowing a custom icon would be fine - I assume whatever icon they pass in would retain the transition between expanded and collapsed at least. I'd be more wary about allowing the removal of the icon entirely is all.
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.
Got it - let me bug them and see if they can get by with the smaller change.
Allow for custom icons and disabled icons.
What: Closes #12029
Additional issues: