mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 06:39:48 +00:00
860565f3a6
* fix ts-expect-error * removes useless await see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/await-thenable.md We're not quite ready to have this rule on everywhere, but in this case I can see that it's correct to follow. * add comment about magic number and moves the assignment to the one place it's used I opted not to make a ticket because we are recently running out of tickets and this seems to be a relatively small thing @reynolek please confirm this is the correct course of action. * initialize ref to reflect reality (and include actual type) * fixes root cause of error, inlines one-liners the error with the type of `_handleInputColorChange` was due to `onChange` being the wrong prop to use (where `onChange` is the one we want). * use onChange instead of onInput to access correct types ultimately, since react's behavior diverged from the DOM behavior to match onInput, this should have no effect on any functionality since react assigns this event to `onChange` anyway. see https://github.com/facebook/react/blob/master/fixtures/attribute-behavior/src/attributes.js#L2089 * clears remaining ts-expect-errors in file * updates fallback call per review feedback |
||
---|---|---|
.. | ||
.storybook | ||
src | ||
webpack | ||
.eslintignore | ||
.eslintrc.js | ||
.gitignore | ||
.npmignore | ||
.nvmrc | ||
jest.config.js | ||
package-lock.json | ||
package.json | ||
README.md | ||
svgr.config.js | ||
tsconfig.build.json | ||
tsconfig.json | ||
vercel.json |
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:
- All background colors should be black (#000)
- 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.