insomnia/packages/insomnia-components
John Chadwick 5622393f24
Enable strict TypeScript in insomnia. (#4869)
* Enable strict TypeScript in insomnia.

* Remove implied tsconfig settings.
2022-06-16 22:13:54 +00:00
..
src Enable strict TypeScript in insomnia. (#4869) 2022-06-16 22:13:54 +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 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.0 and lerna package versions 2022-06-16 09:58:24 +00:00
package.json Bump app version to 2022.5.0-beta.0 and lerna package versions 2022-06-16 09:58:24 +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 ️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.