Created
March 24, 2017 05:15
-
-
Save moaible/3b6fd736bc7455cd4818a3aa48ce0ff4 to your computer and use it in GitHub Desktop.
react-sticky sample
This file contains hidden or 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
| /* @flow */ | |
| import React from 'react' | |
| import { StickyContainer, Sticky } from 'react-sticky' | |
| import Header from '../../components/header' | |
| import Footer from '../../components/footer' | |
| type Props = { | |
| children: React.Children | |
| } | |
| export default class LayoutContainer extends React.Component { | |
| constructor(props: Props) { | |
| super(props) | |
| console.log(props) | |
| } | |
| render() { | |
| return ( | |
| <StickyContainer> | |
| <Header/> | |
| {this.props.children} | |
| <Sticky> | |
| <Footer/> | |
| </Sticky> | |
| </StickyContainer> | |
| ) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment