Make Scroll within Panel inherit bottom rounded corners #1358
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.
This PR addresses a slight visual glitch happening when rendering
Panels
without buttons, in which the bottom corners were rendered without roundiness.Context
the
Panel
component is a wrapper aroundCard
, which conditionally renders<CardContent />
as the last children if some buttons have been provided, and can also wrap the panel content with<Scroll />
ifscrollable
prop is true.For simplicity, the default value for
scrollable
is true, so that you don't need to remember adding it and it just works if the content is too long.During the development of hypothesis/client#5938, we found some
Panels
andDialogs
where bottom corners were not rendered as rounded, because they didn't have buttons. It was worked aroundt by settingscrollable={false}
, as this was not needed: hypothesis/client#5938 (comment)With these changes, that workaround would not be needed anymore.
Testing steps
The pattern library included two similar examples of scrollable panels. I have edited one of them so that it does not include buttons, in order to verify rounded corners work.