inject-style

v1.0.1arrow_drop_down
v1.0.1
v1.0.0
STATUS
Passing
DOWNLOADS
32
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
6 years ago
SIZE
N/A
Injects the provided style into the styleStore.
1 contributor
Install inject-style as a package?
Copied
npm i @bit/tomlandau.belle.utils.inject-style
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
chevron_left
chevron_right

Injects the provided style into the styleStore.

Injects the provided style into the styleStore.

Constructs all the stored styles & injects them to the DOM.

Injects a style tag and adds multiple passed styles.

By using this function someone can make sure the DOM is updated only once.

Example
```
const styles = [
  {
    id: 'style-0.0.2',
    style: { color: '#F00' },
    pseudoClass: 'hover'
  }
];
injectStyles(styles);
```

Removes all pseudoClass styles based on the provided styleId.

Removes all pseudoClass styles based on all provided styleIds.

Injects a style tag and adds the passed style for the provided pseudoClass.

Help and resources