react-svg 5.0.22 → 5.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -7
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -5,13 +5,11 @@
|
|
|
5
5
|
[](https://www.npmjs.com/package/react-svg)
|
|
6
6
|
[](https://www.npmjs.com/package/react-svg)
|
|
7
7
|
|
|
8
|
-
> A React component that
|
|
8
|
+
> A React component that injects SVG into the DOM.
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Background
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
> There are a number of ways to use SVG on a page (object, embed, iframe, img, CSS background-image) but to unlock the full potential of SVG, including full element-level CSS styling and evaluation of embedded JavaScript, the full SVG markup must be included directly in the DOM.
|
|
12
|
+
Let's say you have an SVG and you'd like to inject it into the DOM [because reasons](https://github.com/tanem/svg-injector#why). This module will do the heavy lifting for you by delegating the process to [SVGInjector](https://github.com/tanem/svg-injector), which will make an AJAX request for the SVG and then swap in the SVG markup inline. The async loaded SVG is also cached so multiple uses of an SVG only require a single server request.
|
|
15
13
|
|
|
16
14
|
## Basic Usage
|
|
17
15
|
|
|
@@ -91,8 +89,7 @@ For the minified production version, make sure you have already included:
|
|
|
91
89
|
|
|
92
90
|
## Credits
|
|
93
91
|
|
|
94
|
-
|
|
95
|
-
- The [Atomic](https://github.com/atomic-app) crew for allowing me to take ownership of the repo.
|
|
92
|
+
Thanks to the author(s) of [the original SVGInjector](https://github.com/iconic/SVGInjector), without which none of this would have been possible :clap:
|
|
96
93
|
|
|
97
94
|
## License
|
|
98
95
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-svg",
|
|
3
|
-
"version": "5.0.
|
|
4
|
-
"description": "A React component that
|
|
3
|
+
"version": "5.0.23",
|
|
4
|
+
"description": "A React component that injects SVG into the DOM.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "es/react-svg.js",
|
|
7
7
|
"jsnext:main": "es/react-svg.js",
|