Dropdown.Toggle accepts all ButtonProps or LabelProps + unstyled prop #479
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Something that was bothering me - Dropdown.Toggle doesn't accept all ButtonProps but easily could. Caused me to use button={false} and just put my own Button inside of it many times. Added the same support for Label if
button={false}.Also added an
unstyledprop while I was there in case people want to use their own component but still have the Toggle work properly. Only HTMLAttributes props are available ifunstyled={true}Should be fully backwards compatible
Demo
Screen.Recording.2025-07-30.at.12.08.02.AM-compressed.mp4