tabler-icons icon indicating copy to clipboard operation
tabler-icons copied to clipboard

React components should append className prop

Open needim opened this issue 1 year ago • 3 comments

Hi, currently if we pass a className prop to any Icon component we are losing tabler-icon tabler-icon-${iconName} classes because it is overwriting with ...rest.

It is nice to keep them so we can define a default stroke-with via CSS.

.tabler-icon {
  stroke-width: 1.25;
}

https://github.com/tabler/tabler-icons/blob/74838ded9980b6f134bb6f7edcf916cca4a2d97f/packages/icons-react/src/createReactComponent.js#L6-L19

needim avatar Mar 12 '23 15:03 needim

Hi, thanks for submitting issue We will fix it to combine attributes correctly

SyntaxJoker avatar Mar 16 '23 18:03 SyntaxJoker

Thanks 👍

needim avatar Mar 16 '23 18:03 needim

@codecalm has there been any progress on this? Would you accept a PR?

Rinaldo avatar Jan 03 '24 20:01 Rinaldo