Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Footer extends Component {
- constructor(props) {
- super(props);
- this.state = {
- privacyVisibile: false
- };
- this.togglePrivacyVisible = this.togglePrivacyVisible.bind(this)
- }
- togglePrivacyVisible = () => {
- const { privacyVisibile } = this.state;
- this.setState({ privacyVisibile : !privacyVisibile })
- }
- render() {
- return (
- <div>
- {this.state.privacyVisibile && <Privacy />}
- <ul className="footer-menu">
- <li><a href="about.html">About</a></li>
- <li><a href="privacy.html" onClick=
- {this.togglePrivacyVisible}>Privacy</a></li>
- </ul>
- </div>
- )
- }
- }
- export default Footer;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement