css-vars-ponyfill-react

1.1.1 • Public • Published

Css Vars Ponyfill React

N|Solid

Build Status

npm module to remove problems of css vars in un supported browsers e.g Internet explorer 9+

Installation

run following command:

> npm install css-vars-ponyfill-react --save

Usage

in your main index.js or app.js file use

import { CssVarsPonyfill } from 'css-vars-ponyfill-react'

and call the function anywhere in your index.js or app.js code

CssVarsPonyfill()

and if you add external stylesheets as well (mostly required in prod builds) just use it as:

CssVarsPonyfill({
    externalStyleSheets: true
})

in case anything goes wrong, you can get the error message with the following callback function.

CssVarsPonyfill({
    externalStyleSheets: true,
    onError: (error) => {
        // your logic here
    }
})

Package Sidebar

Install

npm i css-vars-ponyfill-react

Weekly Downloads

13

Version

1.1.1

License

ISC

Unpacked Size

6.75 kB

Total Files

3

Last publish

Collaborators

  • shahidullahkhan