insomnia/packages/insomnia-components
2022-03-08 18:05:21 -05:00
..
src Remove storybook (#4535) 2022-03-01 13:52:10 +01:00
webpack Use safe state and reducer dispatch hooks (#3483) 2021-06-23 12:40:48 -04: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 updates type-fest to latest (#4552) 2022-03-08 18:05:21 -05:00
package.json updates type-fest to latest (#4552) 2022-03-08 18:05:21 -05: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 [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
tsconfig.json [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12: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.