storybookjs / design-system

🗃 Storybook Design System
https://master--5ccbc373887ca40020446347.chromatic.com/
1.91k stars 585 forks source link

Format icon elements so react treats them as a the children of an svg #375

Closed JonathanKolnik closed 2 years ago

JonathanKolnik commented 2 years ago

There is a console error Warning: Each child in a list should have a unique "key" prop.

This adds a key to each path child within an icon

📦 Published PR as canary version: 7.7.7-canary.375.d1c789b.0
:sparkles: Test out this PR locally via: ```bash npm install @storybook/design-system@7.7.7-canary.375.d1c789b.0 # or yarn add @storybook/design-system@7.7.7-canary.375.d1c789b.0 ```
JonathanKolnik commented 2 years ago

the test suite isn't as strict here and didn't fail even though the story logged a console warning, maybe we should update that because it's going to always be a problem if you pull the version into an app that does have that stricter requirement and then you end up with needing a patch like this PR.

JonathanKolnik commented 2 years ago

@MichaelArestad the linter complains less if we follow this pattern for the icons, is that ok with you?

github-actions[bot] commented 2 years ago

:rocket: PR was released in v7.7.7 :rocket: