Skip to content

Conversation

@Zulaxy
Copy link

@Zulaxy Zulaxy commented Jul 26, 2024

Description

2 new inclusions:

I was using that package and I found the current approach to adding custom icons not that much intuitive.

For that reason I made it so it is possible to add the corresponding custom item directly in the items array - as ReactNode/plain html

In addition, while using React Chrono, I wanted to change the default text when expanding and collapsing a card's content but that was not possible. For example if a user wants it to display Expand/Collapse instead of 'read more'/'read less'.

I also included that.

There is already a PR for the texts expand and collapse
#249
I just checked it and saw that it uses prop drilling and passes the 2 values as separate props. I decided to use the global context.

I wasn't sure if that minor change would require update in the demos as a separate version, but I included my changes inside
https://react-chrono-kitchen-sink.prabhumurthy.com/vertical-custom-icon - both the custom read more text and the custom icon. The first icon in the data object is the custom one.


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

… items array - and custom text for the expand/collapse button for the cards
@vercel
Copy link

vercel bot commented Jul 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-chrono-uc7v ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 26, 2024 5:56pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant