diff --git a/readme.md b/readme.md index 17bee88..d808b31 100644 --- a/readme.md +++ b/readme.md @@ -1,31 +1,40 @@ -

css-style-inject

+[![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) -
-

- This is a plugin to inject styles to document head dynamically and it checks injections by unique id to prevent style duplication. -

+# CSS Style Injector + +## Installation -

List of features

+### npm - +```terminal +npm i css-style-inject +``` -

Download & Installation

+### yarn -```shell -$ npm i css-style-inject +```terminal +yarn add css-style-inject ``` -

Contributing

-Keep it simple. Keep it minimal. -

Authors or Acknowledgments

- +
-

License

+## Usage +Add this to your javascript/ typescript file -This project is licensed under the ISC License \ No newline at end of file +### 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') +```