Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SPP 2143 Learning Through Connecting
ltc_website
Commits
37c1a856
Commit
37c1a856
authored
Mar 17, 2020
by
amarcic
Browse files
PageHeader: added Grid and aligned language button right
parent
cea87e61
Changes
1
Show whitespace changes
Inline
Side-by-side
src/components/PageHeader/PageHeader.jsx
View file @
37c1a856
import
React
from
'
react
'
;
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
ClickAwayListener
from
'
@material-ui/core/ClickAwayListener
'
;
import
Grow
from
'
@material-ui/core/Grow
'
;
...
...
@@ -65,11 +65,20 @@ export const PageHeader = () => {
return
(
<
div
className
=
{
classes
.
root
}
>
<
Grid
container
direction
=
"row"
justify
=
"flex-end"
>
<
Grid
item
>
<
Button
ref
=
{
anchorRef
}
aria-controls
=
{
open
?
'
menu-list-grow
'
:
undefined
}
aria-haspopup
=
"true"
onClick
=
{
handleToggle
}
>
<
TranslateIcon
/>
{
t
(
'
current language
'
)
}
</
Button
>
...
...
@@ -92,6 +101,8 @@ export const PageHeader = () => {
</
Grow
>
)
}
</
Popper
>
</
Grid
>
</
Grid
>
</
div
>
);
};
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment