Skip to content

Commit 09e6ab6

Browse files
authored
Merge pull request #221 from puppetlabs/PDS-436
(PDS-436) Add instructions for adding new icons
2 parents 4bd3bd0 + 8e83fa1 commit 09e6ab6

File tree

1 file changed

+7
-0
lines changed
  • packages/react-components/source/react/library/icon

1 file changed

+7
-0
lines changed

packages/react-components/source/react/library/icon/Icon.md

+7
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,13 @@ const Renderer = () => {
124124
<Renderer />;
125125
```
126126

127+
## Adding icons
128+
129+
1. _Design_: Create a new icon following the checklist and naming conventions on the [Iconography Foundations](#/Foundations/Iconography) page.
130+
2. _Engineering_: Run the SVG through [svgo](https://github.com/svg/svgo) to minify and remove redundant data.
131+
3. _Engineering_: Strip out the wrapping `svg` element, usually (but not always) leaving just a `path`.
132+
4. _Engineering_: Add the icon to [icons.js](https://github.com/puppetlabs/design-system/blob/master/packages/react-components/source/react/library/icon/icons.js), specifying the icon name and native SVG sizes (usually "medium" for 16px but optionally also "tiny" for 8px, "small" for 12px, or "large" for 24px).
133+
127134
## Related
128135

129136
- [Button](#/React%20Components/Button) : buttons are able to render an icon as part of the component

0 commit comments

Comments
 (0)