8162d052bf
# Checklist for submitter If some of the following don't apply, delete the relevant line. - [ ] Manual QA for all new/changed functionality --------- Co-authored-by: Gabriel Hernandez <ghernandez345@gmail.com> |
||
---|---|---|
.. | ||
_styles.scss | ||
Icon.stories.tsx | ||
Icon.tsx | ||
index.ts | ||
README.md |
Fleet icons library
Migrating icons
There is a current migration of icons from pixelated PNG files to SVG components.
For internal developers, the source of truth for icon SVGs is on Fleet style guide on Figma. Current progress on migrating icons is tracked on a Fleet icons spreadsheet.
Code organization
Icon directory
The Icon
directory includes global styling, the global Icon
component, and the storybook integration.
icons directory
The icons
directory includes separate files for all SVG components for Fleet icons.
Each component can be modified to take various props including but not limited to color
using frontend/styles/var/colors.ts
or size
using frontend/styles/var/icon_sizes
.
index.ts
maps all icon names used in <Icon name="icon-name" />
to its respective SVG component.
How to view Fleet icons
Figma extensions for SVG previews cannot render all SVG components. Use Storybook to easily view Fleet icons by running yarn storybook
.