@oqton/icons
v1.0.9
Published
Oqton's icon library.
Downloads
7
Keywords
Readme
Oqton Icons
Naming Icons
- Icons are not named after what they look like but after their purpose.
- e.g.
Delete
instead ofTrashcan
. This avoids problems when we want to change the visual paradigm of actions.
- e.g.
- Icon names cannot begin with a number. This is due to javascript not allowing variable names that begin with numbers.
- Instead of
3D-Viewer
, useThreeD-Viewer
.
- Instead of
- The icon name should contain no spaces. If a separation is necessary between words, use a hyphen.
- e.g.
Foo-Bar
instead ofFoo Bar
- e.g.
- Different sized icons with the same purpose should be named identically.
- e.g.
Icons - 12px/Add.svg
andIcons - 16px/Add.svg
- e.g.
Export from Sketch to Front End
- Select new artboards and choose Make Exportable in the .svg format.
- Create new local branch in the Oqton/Platform repo.
- Choose File > Export in Components - Icons.sketch.
- Save Files in
src/svgs
. - Navigate to that folder in Finder, select the folder and choose CMD+C
- Open Terminal and type
cd
and then choose CMD+V - Type
yarn update-icon-library
- Review and commit all changes
- Create new PR from the branch
Some icons are animated or dynamically generated. Those artboards don't export svgs.
Converting svgs to React components.
yarn update-icon-library
Generate a named export for every svg file to be used in our icon library. This should be run whenever new svgs are added to the icon library.
NOTE: SVGs should not contain or tags with generic "IDs". These can cause unexpected behaviour when styling icons colours.