Created
October 13, 2018 06:05
-
-
Save leohxj/76117b9ede040f6baf704da8f98ef620 to your computer and use it in GitHub Desktop.
#react
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 PropTypes from 'prop-types'; | |
import React from 'react'; | |
import styles from './index.less'; | |
export default function Banner({ hasLogo }) { | |
const logo = hasLogo ? <div className={styles.logo} /> : null; | |
return <div className={styles.container}>{logo}</div>; | |
} | |
Banner.propTypes = { | |
hasLogo: PropTypes.bool | |
}; | |
Banner.defaultProps = { | |
hasLogo: false | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment