microsoft / fluentui-system-icons

Fluent System Icons are a collection of familiar, friendly and modern icons from Microsoft.
https://aka.ms/fluentui-system-icons
MIT License
5.9k stars 518 forks source link

The "bundleIcon" helper shouldn't pass "filled" prop #519

Closed jurokapsiar closed 1 year ago

jurokapsiar commented 1 year ago

bundleIcon passes filled prop when creating icons.

However since filled props is not valid for svg element, we get this warning when writing tests for components that have icons with filled prop set:

image

(please note budleIcon in the stacktrace)

The code in question:

image

This could be presumably fixed by changing it as follows:

const {
      className,
      primaryFill = 'currentColor',
      filled,
      ...rest,
    } = props;

and passing rest instead of props.