Skip to content

Commit 658d952

Browse files
author
Shawn Taylor
authored
Update debug icon (#124)
1 parent b2a9484 commit 658d952

File tree

5 files changed

+27
-6
lines changed

5 files changed

+27
-6
lines changed

.changeset/nice-kids-remember.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@cypress-design/icon-registry': minor
3+
'@cypress-design/react-icon': minor
4+
'@cypress-design/vue-icon': minor
5+
---
6+
7+
Update debug icon

ReadMe.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,25 @@ In the new directory, you will find a React and a Vuejs version to complete. Eac
9797

9898
### Adding a new icon
9999

100-
New icons should be added to the `icon-registry/icons` directory and named according to the format `<category>-<icon-name>_x<size>.svg`, for example, `technology-debugger_x24.svg`.
100+
New icons should be added to the `icon-registry/icons` directory and named according to the format `<category>-<icon-name>_x<size>.svg`, for example, `object-bug_x24.svg`.
101+
102+
When grabbing the icon from Figma, make sure the width and height of the icon is equal to its name (e.g. `x24` icons should be 24x24px). If it isn't, try going up a layer in Figma.
103+
104+
The name and size should match what's shown in Figma.
105+
106+
![image](copy-svg.png)
101107

102108
Once added, the svg attributes should be tweaked so as to integrate with the icon generation tooling.
103109

104110
- Replace main color with `currentColor`
105111
- Add `class="icon-dark"` to paths that are dark, generally the strokes
106112
- Add `class="icon-light"` to paths that are light, generally the fills
113+
- Remove the `width` and `height` attributes of the SVG
107114

108115
To verify that the icon is properly hooked up, run `yarn start` and navigate to the `icons` page. Search for your icon and tweak the colors. If you need to adjust the attributes you can run `yarn build:icons` and storybook will update with the latest changes.
109116

117+
When an icon is added or updated, the changeset for both the '@cypress-design/react-icon' and '@cypress-design/vue-icon' packages should include a minor version bump.
118+
110119
### Updating the component generator
111120

112121
When you use the `yarn new:component` command, the template used is called a generator. It could be useful to update it from time to time if the standards change.

copy-svg.png

627 KB
Loading
Lines changed: 5 additions & 0 deletions
Loading
Lines changed: 5 additions & 5 deletions
Loading

0 commit comments

Comments
 (0)