Skip to content

Commit

Permalink
Fix SVG errors
Browse files Browse the repository at this point in the history
* Removed "xmlns" attributes, which are optional anyway
* Renamed "fill-rule" attributes to "fillRule" for React compatibility
  • Loading branch information
Jeff Bellsey committed Jul 7, 2016
1 parent f10726c commit 4a08ad9
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions check.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import React from 'react'
export default React.createClass({
render() {
return (
<svg width="14" height="11" viewBox="0 0 14 11" xmlns="http://www.w3.org/2000/svg">
<svg width="14" height="11" viewBox="0 0 14 11">
<title>
switch-check
</title>
<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"/>
<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"/>
</svg>
)
}
Expand Down
4 changes: 2 additions & 2 deletions check.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ module.exports = React.createClass({
render: function render() {
return React.createElement(
"svg",
{ width: "14", height: "11", viewBox: "0 0 14 11", xmlns: "http://www.w3.org/2000/svg" },
{ width: "14", height: "11", viewBox: "0 0 14 11" },
React.createElement(
"title",
null,
"switch-check"
),
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" })
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" })
);
}
});
2 changes: 1 addition & 1 deletion example/bundle.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-toggle",
"version": "2.1.0",
"version": "2.1.1",
"description": "An elegant, accessible toggle component for React. Also a glorified checkbox.",
"main": "index.js",
"style": "style.css",
Expand Down
4 changes: 2 additions & 2 deletions x.es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import React from 'react'
export default React.createClass({
render() {
return (
<svg width="10" height="10" viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg">
<svg width="10" height="10" viewBox="0 0 10 10">
<title>
switch-x
</title>
<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"/>
<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"/>
</svg>
)
}
Expand Down
4 changes: 2 additions & 2 deletions x.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ module.exports = React.createClass({
render: function render() {
return React.createElement(
"svg",
{ width: "10", height: "10", viewBox: "0 0 10 10", xmlns: "http://www.w3.org/2000/svg" },
{ width: "10", height: "10", viewBox: "0 0 10 10" },
React.createElement(
"title",
null,
"switch-x"
),
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" })
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" })
);
}
});

0 comments on commit 4a08ad9

Please sign in to comment.