insomnia/packages/insomnia-components
2022-03-10 19:49:17 +00:00
..
src Adds generic for Notice in NoticeTable (#4416) 2022-03-09 13:17:14 +00: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 Fix lerna version bumps and don't run release recurring for release PRs (#4576) 2022-03-10 16:58:42 +01:00
package.json Remove gitHead from package.json files (#4584) 2022-03-10 19:49:17 +00: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.