Created
February 27, 2017 15:54
-
-
Save zgababa/04b555e32c1714f89c9f1629f7547420 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
'use strict'; | |
import React, { PropTypes } from 'react'; | |
import Radium from 'radium'; | |
import get from 'lodash.get'; | |
const styles = { | |
info : { | |
position : 'absolute', | |
top : '213px', | |
left : '446px', | |
width : '244px', | |
textAlign : 'center', | |
color : 'whitesmoke', | |
fontWeight : 'normal', | |
fontSize : '1.1em', | |
textTransform : 'uppercase' | |
} | |
}; | |
function ScreenInfo(props) { | |
return ( | |
<div style={styles.info}> | |
{get(props, 'pokemon.name')} | |
</div> | |
); | |
} | |
ScreenInfo.propTypes = { | |
pokemon : PropTypes.shape({ | |
name : PropTypes.string | |
}) | |
}; | |
export default new Radium(ScreenInfo); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment