Created
May 14, 2018 20:36
-
-
Save anghelalexandra/b272bb2e55c0d721c36a0ca98dd4fc83 to your computer and use it in GitHub Desktop.
iOS and Android apps with React Native - React Component
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 PropTypes from 'prop-types'; | |
class ExampleWebComponent extends React.Component { | |
render() { | |
return ( | |
<div className="w100"> | |
<div className="menuTitleWrap"> | |
<img src={this.props.url} className="shadowImage" alt="" /> | |
</div> | |
<p>{this.props.title}</p> | |
</div> | |
); | |
} | |
} | |
ExampleWebComponent.propTypes = { | |
url: PropTypes.string.isRequired, | |
title: PropTypes.string.isRequired, | |
}; | |
export default ExampleWebComponent; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment