Skip to content
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

feat: Tile.tsx: add a <div> element wrapper to tileContent to separate it from other nodes and enable passing down className #973

Closed
wants to merge 0 commits into from

Conversation

alexrah
Copy link

@alexrah alexrah commented Feb 18, 2025

in the component when using tileContent prop to inject multiple content inside a Tile, can be useful to have a wrapper element to separate the injected content from the default children nodes.
Moreover, having a wrapper allow to customize styling by passing down classNames to it

this is an example rendered Tile.tsx

<button class="react-calendar__tile react-calendar__tile--active react-calendar__tile--range react-calendar__tile--rangeStart react-calendar__tile--rangeEnd react-calendar__tile--rangeBothEnds react-calendar__month-view__days__day" style="flex: 0 0 14.2857%; overflow: hidden; margin-inline-end: 0px;" type="button">
<abbr aria-label="February 20, 2025">20</abbr>
<div class="absolute flex gap-0.5">
<span class="rounded-full w-2 h-2 block" style="background-color: rgb(163, 29, 24);"></span>
<span class="rounded-full w-2 h-2 block" style="background-color: rgb(219, 89, 40);"></span>
</div>
</button>

@alexrah alexrah changed the title Tile.tsx: add a <div> element wrapper to tileContent to separate it from other nodes and enable passing down className feat: Tile.tsx: add a <div> element wrapper to tileContent to separate it from other nodes and enable passing down className Feb 18, 2025
@alexrah alexrah marked this pull request as draft February 18, 2025 15:19
@alexrah alexrah closed this Feb 18, 2025
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