styled-leaflet
leaflet.css for styled-components.
The original leaflet.css
is pulled from CDN, and parsed into styled ready format.
Usage
npm install --save styled-leaflet
styled-components v4
styled-components createGlobalStyle documentation
This is just usage example
// ----- index.js const Root = <ReactFragment> <LeafletStyles /> <App /> </ReactFragment>
Also you can use injectGlobal
API:
// ----- styles/index.js injectGlobal` // You can continue writing global styles body { padding: 0; background-color: black; }`
You can also use named imports:
// ES Modules // CommonJSconst leafletStyles LeafletStyles = injectGlobal` `<LeafletStyles />
Version
NO SEMVER!
Why? Because X.Y numbers in vX.Y.Z
version matches X.Y in leaflet
License
The MIT License