Added autohiding of control elements
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user