Do not make sidebar push content

master
Torjus 2018-08-02 14:32:18 +02:00
parent 6cec6e5155
commit 9f0a3ffcad
4 changed files with 15 additions and 15 deletions

View File

@ -82,12 +82,7 @@ class Room extends React.Component
<Appear duration={300}> <Appear duration={300}>
<div data-component='Room'> <div data-component='Room'>
<FullScreenView advancedMode={room.advancedMode} /> <FullScreenView advancedMode={room.advancedMode} />
<div <div className='room-wrapper'>
className='room-wrapper'
style={{
width : toolAreaOpen ? '75%' : '100%'
}}
>
<Notifications /> <Notifications />
<ToolAreaButton /> <ToolAreaButton />
@ -161,10 +156,7 @@ class Room extends React.Component
/> />
</div> </div>
<div <div
className='toolarea-wrapper' className={classnames('toolarea-wrapper', { open: toolAreaOpen })}
style={{
width : toolAreaOpen ? '25%' : '0%'
}}
> >
{toolAreaOpen ? {toolAreaOpen ?
<ToolArea <ToolArea

View File

@ -15,7 +15,7 @@ class ToolAreaButton extends React.Component
} = this.props; } = this.props;
return ( return (
<div data-component='ToolAreaButton'> <div data-component='ToolAreaButton' className={classnames({ on: toolAreaOpen })}>
<div <div
className={classnames('button toolarea-button room-controls', { className={classnames('button toolarea-button room-controls', {
on : toolAreaOpen, on : toolAreaOpen,

View File

@ -7,7 +7,6 @@
left: 0; left: 0;
height: 100%; height: 100%;
width: 100%; width: 100%;
transition: width 0.3s;
> .state { > .state {
position: fixed; position: fixed;
@ -168,12 +167,16 @@
> .toolarea-wrapper { > .toolarea-wrapper {
position: fixed; position: fixed;
width: 0;
top: 0; top: 0;
right: 0; right: 0;
width: 20%;
height: 100%; height: 100%;
background-color: rgba(0,0,0,0.1); background-color: rgba(0,0,0,0.1);
transition: width 0.3s; transition: width 0.3s;
&.open {
width: 25%;
}
} }
} }

View File

@ -1,14 +1,19 @@
[data-component='ToolAreaButton'] { [data-component='ToolAreaButton'] {
position: absolute; position: absolute;
z-index: 101; z-index: 101;
top: 20px; right: 0;
right: 20px;
height: 36px; height: 36px;
width: 36px; width: 36px;
padding: 2rem;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
transition: right 0.3s;
&.on {
right: 25%;
}
> .button { > .button {
flex: 0 0 auto; flex: 0 0 auto;