insomnia/packages/insomnia-components
Opender Singh d91e6735a7 lib@2.2.11
2020-07-02 11:19:48 +12:00
..
.storybook Unit test improvements (#2337) 2020-07-01 15:57:42 -07:00
assets Add multi-switch component, refactor radio group, and add success icon (#2324) 2020-06-26 10:45:11 -04:00
components POC for Unit Test UI (#2315) 2020-07-01 14:17:14 -07:00
flow-typed Prevent insomnia-components from bundling entire crypto module (#2291) 2020-06-12 20:31:37 -07:00
webpack Bundling improvements for insomnia-components (#2297) 2020-06-17 07:46:13 +12:00
.babelrc Initial designer merge 2020-04-26 13:33:39 -07:00
.flowconfig Initial designer merge 2020-04-26 13:33:39 -07:00
.gitignore Remove built files from source control and update bootstrap steps (#2165) 2020-05-15 08:57:03 +12:00
.npmignore Remove built files from source control and update bootstrap steps (#2165) 2020-05-15 08:57:03 +12:00
.svgrrc.json Initial designer merge 2020-04-26 13:33:39 -07:00
index.js Swap out switch for new activity toggle component (#2335) 2020-06-30 16:54:56 -07:00
package-lock.json lib@2.2.11 2020-07-02 11:19:48 +12:00
package.json lib@2.2.11 2020-07-02 11:19:48 +12:00
README.md Initial designer merge 2020-04-26 13:33:39 -07:00

insomnia-components

insomnia-components is a React component library of UI elements needed to build Insomnia. Explore the components via Storybook!

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.

You can view the current icons available here.