css-vars-ponyfill-react
v1.1.1
Published
npm module to remove problems of css vars in un supported browsers e.g Internet explorer 9+
Downloads
29
Maintainers
Readme
Css Vars Ponyfill React
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
}
})