insomnia/packages/insomnia-components
2022-07-21 17:33:22 +00:00
..
src fixes ContentTypeDropdown and AuthDropdown (#4918) 2022-06-29 17:34:28 -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 bump node and electron 19 (#4847) 2022-06-09 09:17:28 +01:00
jest.config.js chore(deps): upgrades jest to 28 (#4783) 2022-05-17 08:18:06 -04:00
package-lock.json Bump app version to 2022.5.0-beta.5 and lerna package versions 2022-07-21 17:33:22 +00:00
package.json Bump app version to 2022.5.0-beta.5 and lerna package versions 2022-07-21 17:33:22 +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 tsconfig cleanup (#4908) 2022-06-27 12:57:50 -04:00
tsconfig.json tsconfig cleanup (#4908) 2022-06-27 12:57:50 -04: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.