Skip to content

Commit

Permalink
fix: update readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kherP committed Feb 22, 2021
1 parent 5f9d838 commit 59c45cf
Showing 1 changed file with 30 additions and 21 deletions.
51 changes: 30 additions & 21 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,40 @@
<h1 align="center"> css-style-inject </h1>
[![https://img.shields.io/npm/v/css-style-inject](https://img.shields.io/npm/v/css-style-inject)](https://www.npmjs.com/package/css-style-inject)
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=sebgroup/frontend-tools)](https://dependabot.com)
![https://img.shields.io/npm/l/css-style-inject](https://img.shields.io/npm/l/css-style-inject)
![npm bundle size](https://img.shields.io/bundlephobia/minzip/css-style-inject)

<hr/>

<p>
This is a plugin to inject styles to document head dynamically and it checks injections by unique id to prevent style duplication.
</p>
# CSS Style Injector

## Installation

<h3> List of features </h3>
### npm

<ul>
<li>To attach styles: <code>injectCSS('..css', 'uniqueId')</code></li>
<li>To detach styles: <code>detachCSS('uniqueId')</code></li>
</ul>
```terminal
npm i css-style-inject
```

<h3> Download & Installation </h3>
### yarn

```shell
$ npm i css-style-inject
```terminal
yarn add css-style-inject
```
<h3>Contributing</h3>
Keep it simple. Keep it minimal.

<h3>Authors or Acknowledgments</h3>
<ul>
<li>Kher Phay Chang</li>
</ul>
<hr/>

<h3>License</h3>
## Usage
Add this to your javascript/ typescript file

This project is licensed under the ISC License
### attach styles to head
```typescript
import { injectCSS } from "css-style-inject";
injectCSS('..css', 'uniqueId');
```

### detach styles from head
```typescript
import { detachCSS } from "css-style-inject";
detachCSS('uniqueId')
```

0 comments on commit 59c45cf

Please sign in to comment.