Skip to content

Instantly share code, notes, and snippets.

@Toolo
Last active November 14, 2019 09:42
Show Gist options
  • Save Toolo/b9a919cc05d559897ccc19d8dedc4e96 to your computer and use it in GitHub Desktop.
Save Toolo/b9a919cc05d559897ccc19d8dedc4e96 to your computer and use it in GitHub Desktop.
Sample usage of stick to bottom
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
};
@DiegoSPB
Copy link

Good stuff!

</StickToBottom> -> </FixedBottom>

@Toolo
Copy link
Author

Toolo commented Nov 14, 2019

Thanks! I've updated the gist 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment