Skip to content

Conversation

@GermainBergeron
Copy link
Member

Proposed Changes

This pull request improves how the mocked icon components handle the className prop, ensuring that custom classes are merged correctly with default tabler icon classes. The key changes are:

Icon Component Behavior:

  • The mocked icon components now accept a className prop and properly combine it with the default tabler icon class, allowing for easier styling and testing.

Testing Enhancements:

  • Added a new test to verify that the className prop is handled correctly and that the rendered SVG element includes both the default and custom classes.

Potential Breaking Changes

None

Acceptance Criteria

  • The proposed changes are covered by unit tests
  • The potential breaking changes are clearly identified
  • README.md is adjusted to reflect the proposed changes (if relevant)

@GermainBergeron GermainBergeron requested a review from a team as a code owner November 10, 2025 14:09
@GermainBergeron GermainBergeron requested review from FelixBlaisThon, Copilot and gdostie and removed request for a team November 10, 2025 14:09
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for custom className props in Tabler icon mocks, allowing developers to pass additional CSS classes alongside the default Tabler classes.

Key Changes:

  • Extract and handle the className prop explicitly in Tabler icon mocks
  • Combine custom classNames with default Tabler classNames using string concatenation
  • Add test coverage for className prop handling

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/react-icons/src/mock/index.tsx Modified TablerIconMock to extract className from props and combine it with the default Tabler className
packages/react-icons/src/mock/index.spec.tsx Added test case verifying that custom className props are correctly merged with default Tabler classes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

Co-authored-by: Copilot <[email protected]>
@GermainBergeron GermainBergeron merged commit 2f59e60 into master Nov 10, 2025
9 checks passed
@GermainBergeron GermainBergeron deleted the fix/react-icons-tabler-mock-className branch November 10, 2025 14:50
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.

3 participants