Skip to content

Commit 5d9fb5b

Browse files
committed
Remove react inline svg and import octicons css
1 parent 80515ee commit 5d9fb5b

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

.storybook/Octicon.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import React from 'react'
22
import {storiesOf} from '@storybook/react'
33
import octicons from 'octicons'
4-
import SVGInline from 'react-svg-inline'
54

65
export const Octicon = (props) => {
76
const {name} = props
87
if (name in octicons) {
9-
return <SVGInline svg={octicons[name].toSVG(props)} />
8+
const svg = octicons[name].toSVG(props)
9+
return <span dangerouslySetInnerHTML={ {__html: svg } } />
1010
} else {
1111
throw new Error(`No such octicon: "${name}"!`)
1212
}

.storybook/preview-head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
<link rel="stylesheet" href="https://unpkg.com/primer-css@9.2.0/build/build.css">
1+
<link rel="stylesheet" href="https://unpkg.com/octicons@7.0.1/build/build.css">
22
<script src="https://github.com/site/assets/styleguide.js" async></script>

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"raw-loader": "^0.5.1",
4545
"react": "^15.6.1",
4646
"react-dom": "^15.6.1",
47-
"react-svg-inline": "^2.0.0",
4847
"registry-url": "^3.1.0",
4948
"remark": "^8.0.0",
5049
"sass-loader": "^6.0.6",

0 commit comments

Comments
 (0)