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.
Files changed (2) hide show
  1. package/README.md +4 -7
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -5,13 +5,11 @@
5
5
  [![npm version](https://img.shields.io/npm/v/react-svg.svg?style=flat-square)](https://www.npmjs.com/package/react-svg)
6
6
  [![npm downloads](https://img.shields.io/npm/dm/react-svg.svg?style=flat-square)](https://www.npmjs.com/package/react-svg)
7
7
 
8
- > A React component that uses [SVGInjector](https://github.com/tanem/SVGInjector) to add SVG to the DOM.
8
+ > A React component that injects SVG into the DOM.
9
9
 
10
- ## Why?
10
+ ## Background
11
11
 
12
- To quote [the original SVGInjector docs](https://github.com/iconic/SVGInjector#why):
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
- - [PrototypeAlex](https://github.com/PrototypeAlex) for authoring the original versions.
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.22",
4
- "description": "A React component that uses SVGInjector to add SVG to the DOM.",
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",