Commit 37c1a856 authored by amarcic's avatar amarcic
Browse files

PageHeader: added Grid and aligned language button right

parent cea87e61
import React from 'react'; import React from 'react';
import { useTranslation } from 'react-i18next'; import { useTranslation } from 'react-i18next';
import { Button, MenuList, MenuItem, Paper } from '@material-ui/core'; import { Button, MenuList, MenuItem, Paper, Grid } from '@material-ui/core';
import TranslateIcon from '@material-ui/icons/Translate'; import TranslateIcon from '@material-ui/icons/Translate';
import ClickAwayListener from '@material-ui/core/ClickAwayListener'; import ClickAwayListener from '@material-ui/core/ClickAwayListener';
import Grow from '@material-ui/core/Grow'; import Grow from '@material-ui/core/Grow';
...@@ -65,11 +65,20 @@ export const PageHeader = () => { ...@@ -65,11 +65,20 @@ export const PageHeader = () => {
return( return(
<div className={classes.root}> <div className={classes.root}>
<Grid
container
direction="row"
justify="flex-end"
>
<Grid
item
>
<Button <Button
ref={anchorRef} ref={anchorRef}
aria-controls={open ? 'menu-list-grow' : undefined} aria-controls={open ? 'menu-list-grow' : undefined}
aria-haspopup="true" aria-haspopup="true"
onClick={handleToggle} onClick={handleToggle}
> >
<TranslateIcon/> {t('current language')} <TranslateIcon/> {t('current language')}
</Button> </Button>
...@@ -92,6 +101,8 @@ export const PageHeader = () => { ...@@ -92,6 +101,8 @@ export const PageHeader = () => {
</Grow> </Grow>
)} )}
</Popper> </Popper>
</Grid>
</Grid>
</div> </div>
); );
}; };
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment