diff --git a/app/javascript/gabsocial/components/floating_action_button.js b/app/javascript/gabsocial/components/floating_action_button.js index e8698227..c92318a7 100644 --- a/app/javascript/gabsocial/components/floating_action_button.js +++ b/app/javascript/gabsocial/components/floating_action_button.js @@ -1,5 +1,6 @@ import { defineMessages, injectIntl } from 'react-intl' import { me } from '../initial_state' +import { CX } from '../constants' import { openModal } from '../actions/modal' import Button from './button' @@ -19,6 +20,7 @@ class FloatingActionButton extends PureComponent { static propTypes = { intl: PropTypes.object.isRequired, onOpenCompose: PropTypes.func.isRequired, + isDesktop: PropTypes.bool, } shouldComponentUpdate(nextProps) { @@ -26,18 +28,35 @@ class FloatingActionButton extends PureComponent { } render() { - const { intl, onOpenCompose } = this.props + const { + intl, + onOpenCompose, + isDesktop, + } = this.props if (!me) return null const message = intl.formatMessage(messages.gab) + const containerClasses = CX({ + posFixed: 1, + z3: 1, + mb15: 1, + mr15: 1, + right0: 1, + bottom55PX: !isDesktop, + bottom0: isDesktop, + pb15: isDesktop, + pr15: isDesktop, + }) + return (