insomnia/packages/insomnia-components
2022-04-20 12:16:02 +00:00
..
src fix(styled-components): add specificity selector (#4711) 2022-04-20 12:16:02 +00:00
.eslintignore Remove storybook (#4535) 2022-03-01 13:52:10 +01:00
.eslintrc.js updates concurrently, lerna, eslint (#4428) 2022-02-02 11:21:25 -05:00
.gitignore Remove storybook (#4535) 2022-03-01 13:52:10 +01:00
.npmignore Fix .npmignore 2021-05-19 14:37:56 +02:00
.nvmrc Chore/upgrade-electron-17 (#4529) 2022-03-07 13:10:35 +00:00
jest.config.js remove duplication of all jest configs (#3375) 2021-05-13 07:29:02 -04:00
package-lock.json ️vite/esbuild (#4329) 2022-04-18 17:27:39 +02:00
package.json ️vite/esbuild (#4329) 2022-04-18 17:27:39 +02:00
README.md Remove storybook (#4535) 2022-03-01 13:52:10 +01:00
svgr.config.js [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
tsconfig.build.json ️vite/esbuild (#4329) 2022-04-18 17:27:39 +02:00
tsconfig.json ️vite/esbuild (#4329) 2022-04-18 17:27:39 +02:00
vite.config.ts ️vite/esbuild (#4329) 2022-04-18 17:27:39 +02:00

insomnia-components

insomnia-components is a React component library of UI elements needed to build Insomnia.

SVGs

We use SVGR on the source SVGs to minify and convert them to React components. This conversion happens during npm run bootstrap.

The generated icons can automatically be bound to the theme library built into Insomnia, by following a few rules. In the source SVG:

  1. All background colors should be black (#000)
  2. All foreground colors should be white (#FFF)

SVGR converts these colors to fill='' and fill='currentColor' respectively. These icons are exposed via svg-icon.js, which sets the css fill and color of the SVG according to the required theme.