Skip to content

Commit 4a08ad9

Browse files
author
Jeff Bellsey
committed
Fix SVG errors
* Removed "xmlns" attributes, which are optional anyway * Renamed "fill-rule" attributes to "fillRule" for React compatibility
1 parent f10726c commit 4a08ad9

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

check.es6.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import React from 'react'
33
export default React.createClass({
44
render() {
55
return (
6-
<svg width="14" height="11" viewBox="0 0 14 11" xmlns="http://www.w3.org/2000/svg">
6+
<svg width="14" height="11" viewBox="0 0 14 11">
77
<title>
88
switch-check
99
</title>
10-
<path d="M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0" fill="#fff" fill-rule="evenodd"/>
10+
<path d="M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0" fill="#fff" fillRule="evenodd"/>
1111
</svg>
1212
)
1313
}

check.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ module.exports = React.createClass({
1010
render: function render() {
1111
return React.createElement(
1212
"svg",
13-
{ width: "14", height: "11", viewBox: "0 0 14 11", xmlns: "http://www.w3.org/2000/svg" },
13+
{ width: "14", height: "11", viewBox: "0 0 14 11" },
1414
React.createElement(
1515
"title",
1616
null,
1717
"switch-check"
1818
),
19-
React.createElement("path", { d: "M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0", fill: "#fff", "fill-rule": "evenodd" })
19+
React.createElement("path", { d: "M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0", fill: "#fff", fillRule: "evenodd" })
2020
);
2121
}
2222
});

example/bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-toggle",
3-
"version": "2.1.0",
3+
"version": "2.1.1",
44
"description": "An elegant, accessible toggle component for React. Also a glorified checkbox.",
55
"main": "index.js",
66
"style": "style.css",

x.es6.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import React from 'react'
33
export default React.createClass({
44
render() {
55
return (
6-
<svg width="10" height="10" viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg">
6+
<svg width="10" height="10" viewBox="0 0 10 10">
77
<title>
88
switch-x
99
</title>
10-
<path d="M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12" fill="#fff" fill-rule="evenodd"/>
10+
<path d="M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12" fill="#fff" fillRule="evenodd"/>
1111
</svg>
1212
)
1313
}

x.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ module.exports = React.createClass({
1010
render: function render() {
1111
return React.createElement(
1212
"svg",
13-
{ width: "10", height: "10", viewBox: "0 0 10 10", xmlns: "http://www.w3.org/2000/svg" },
13+
{ width: "10", height: "10", viewBox: "0 0 10 10" },
1414
React.createElement(
1515
"title",
1616
null,
1717
"switch-x"
1818
),
19-
React.createElement("path", { d: "M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12", fill: "#fff", "fill-rule": "evenodd" })
19+
React.createElement("path", { d: "M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12", fill: "#fff", fillRule: "evenodd" })
2020
);
2121
}
2222
});

0 commit comments

Comments
 (0)