File tree Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Expand file tree Collapse file tree 3 files changed +3
-4
lines changed Original file line number Diff line number Diff line change 11import React from 'react'
22import { storiesOf } from '@storybook/react'
33import octicons from 'octicons'
4- import SVGInline from 'react-svg-inline'
54
65export 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 }
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments