Added autohiding of control elements

master
Håvar Aambø Fosstveit 2019-04-01 09:28:14 +02:00
parent 513c75adde
commit 37ccb6a001
2 changed files with 25 additions and 4 deletions

View File

@ -34,7 +34,17 @@ const styles = (theme) =>
fab :
{
margin : theme.spacing.unit
}
},
show :
{
opacity : 1,
transition : 'opacity .5s'
},
hide :
{
opacity : 0,
transition : 'opacity .5s'
},
});
class Sidebar extends React.PureComponent
@ -71,9 +81,9 @@ class Sidebar extends React.PureComponent
return (
<div
className={classnames(classes.root, 'room-controls', {
'visible' : toolbarsVisible
})}
className={
classnames(classes.root, toolbarsVisible ? classes.show : classes.hide)
}
>
<Fab
aria-label='Share screen'

View File

@ -60,6 +60,16 @@ const styles = (theme) =>
margin : 0,
padding : 0
},
show :
{
opacity : 1,
transition : 'opacity .5s'
},
hide :
{
opacity : 0,
transition : 'opacity .5s'
},
toolbar : theme.mixins.toolbar,
drawerPaper :
{
@ -262,6 +272,7 @@ class Room extends React.PureComponent
<AppBar
position='fixed'
className={room.toolbarsVisible ? classes.show : classes.hide}
>
<Toolbar>
<Badge