fix(phone/messages): fix posiston for Fab

This commit is contained in:
Christopher committed 2021-02-17 20:15:14 +01:00
1 parent f765f35b8c
commit a3fa095f9f
2 files changed
+11 -9

No files matched your search

@@ -36,9 +36,6 @@ export const MessagesApp = () => {
render={() => ( render={() => (
<> <>
<MessagesList /> <MessagesList />
<NewMessageGroupButton
onClick={() => history.push('/messages/new')}
/>
</> </>
)} )}
/> />
@@ -51,6 +48,9 @@ export const MessagesApp = () => {
/> />
</Switch> </Switch>
</AppContent> </AppContent>
<NewMessageGroupButton
onClick={() => history.push('/messages/new')}
/>
<AlertBar /> <AlertBar />
</AppWrapper> </AppWrapper>
); );
@@ -3,11 +3,11 @@ import { makeStyles } from '@material-ui/core/styles';
import { Fab } from '@material-ui/core'; import { Fab } from '@material-ui/core';
import AddIcon from '@material-ui/icons/Add'; import AddIcon from '@material-ui/icons/Add';
const useStyles = makeStyles(() => ({ const useStyles = makeStyles((theme) => ({
root: { root: {
position: 'absolute', position: 'absolute',
bottom: '25px', bottom: theme.spacing(2),
right: '15px', right: theme.spacing(3),
}, },
})); }));
@@ -21,11 +21,13 @@ export function NewMessageGroupButton({
const classes = useStyles(); const classes = useStyles();
return ( return (
<div className={classes.root}> <Fab
<Fab color='primary' onClick={onClick}> className={classes.root}
color='primary'
onClick={onClick}
>
<AddIcon /> <AddIcon />
</Fab> </Fab>
</div>
); );
} }