Closed demoraesgui closed 2 months ago
Latest commit: |
e408d09
|
Status: | ✅ Deploy successful! |
Preview URL: | https://4c2c9076.atlantis.pages.dev |
Branch Preview URL: | https://feat-custom-title-for-disclo.atlantis.pages.dev |
Thanks for the feedback @nad182. Would you mind giving another look?
Motivations
In this update, I've introduced additional flexibility to the Disclosure component by allowing the use of an
ReactNode | ReactNode[]
combination as the title. This enhancement provides developers with more options for crafting visually engaging and informative titles, improving the overall user experience and making the component more versatile across different use cases.Changes
Disclosure component was updated to either fallback to the current behavior if a
string
is provided astitle
or render theReactNode | ReactNode[]
as is.Added
Storybook:
Flex
,Heading
, andIcon
components. Introduced a new storyCustomTitle
demonstrating the use of a custom title in theDisclosure
component.Dependency Updates:
classnames
package to manage conditional class names for theDisclosure
component.Changed
Disclosure
Component:Disclosure
component to accept custom titles by changing thetitle
prop type tostring | ReactNode | ReactNode[]
and adding logic to handle non-string titles.Testing
Disclosure
with a custom title, ensuring the custom title and icon are correctly rendered.Changes can be tested via Pre-release
In Atlantis we use Github's built in pull request reviews.