Last active
November 14, 2019 09:42
-
-
Save Toolo/b9a919cc05d559897ccc19d8dedc4e96 to your computer and use it in GitHub Desktop.
Sample usage of stick to bottom
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
| import React from 'react'; | |
| import PropTypes from 'prop-types'; | |
| // https://github.com/turo/react-fixed-bottom | |
| import FixedBottom from 'react-fixed-bottom'; | |
| const MyBottomBar = ({onLeftClick, onRightClick}) => ( | |
| <FixedBottom offset={20}> | |
| <div className="myBottomBar"> | |
| <button onClick={onLeftClick} type="button">Left</button> | |
| <button onClick={onRightClick} type="button">Right</button> | |
| </div> | |
| </FixedBottom> | |
| ); | |
| MyBottomBar.propTypes = { | |
| onLeftClick: PropTypes.func.isRequired, | |
| onRightClick: PropTypes.func.isRequired | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Good stuff!
</StickToBottom>-></FixedBottom>