Created
October 7, 2017 15:46
-
-
Save mikesurowiec/f41a95479f6dcfef86fb2313130b0af9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import DCMetroMapHTML from './DCMetroMapHTML.js'; | |
import Dimensions from 'react-dimensions'; | |
const svgViewportWidth = 3266; | |
const svgViewportHeight = 3012; | |
class DCMetroMap extends React.Component { | |
render() { | |
const { containerHeight, containerWidth } = this.props; | |
return ( | |
<div id="container"> | |
<svg | |
width={containerWidth} | |
height={containerHeight} | |
viewBox={[0, 0, svgViewportWidth, svgViewportHeight].join(' ')} | |
version="1.1" | |
> | |
<g id="contentWrap" | |
dangerouslySetInnerHTML={{ __html: DCMetroMapHTML }} | |
/> | |
</svg> | |
); | |
} | |
} | |
export default Dimensions()(DCMetroMap); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment