Skip to content

Instantly share code, notes, and snippets.

@waynelkh
Created January 28, 2016 18:53
Show Gist options
  • Save waynelkh/d8408a706e9146b2e70a to your computer and use it in GitHub Desktop.
Save waynelkh/d8408a706e9146b2e70a to your computer and use it in GitHub Desktop.
like inbox right bottom button, always fix
import React, { PropTypes } from 'react'
import FloatingActionButton from 'material-ui/lib/floating-action-button';
const FixButton = ({ onAddClick }) => {
return (
<FloatingActionButton
style={{ right: 20, bottom: 20, position: 'fixed' }}
onClick={onAddClick}>
<ContentAdd />
</FloatingActionButton>
)
}
FixButton.propTypes = {
onAddClick: PropTypes.func.isRequired,
}
export default FixButton;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment