Skip to content
Snippets Groups Projects
Commit bc0cc020 authored by Chris Beer's avatar Chris Beer
Browse files

Pull WorkspaceElastic styles up

parent a476b2d4
Branches
No related tags found
1 merge request!19Draft: Merge video support into mui5
...@@ -6,6 +6,12 @@ import ResizeObserver from 'react-resize-observer'; ...@@ -6,6 +6,12 @@ import ResizeObserver from 'react-resize-observer';
import WorkspaceElasticWindow from '../containers/WorkspaceElasticWindow'; import WorkspaceElasticWindow from '../containers/WorkspaceElasticWindow';
import ns from '../config/css-ns'; import ns from '../config/css-ns';
const Root = styled('div', { name: 'WorkspaceElastic', slot: 'root' })({
height: '100%',
position: 'relative',
width: '100%',
});
const StyledRnd = styled(Rnd)({ const StyledRnd = styled(Rnd)({
boxSizing: 'border-box', boxSizing: 'border-box',
margin: 0, margin: 0,
...@@ -39,7 +45,7 @@ class WorkspaceElastic extends Component { ...@@ -39,7 +45,7 @@ class WorkspaceElastic extends Component {
const offsetY = workspace.height / 2; const offsetY = workspace.height / 2;
return ( return (
<div style={{ height: '100%', position: 'relative', width: '100%' }}> <Root>
<ResizeObserver <ResizeObserver
onReflow={() => {}} onReflow={() => {}}
onResize={(rect) => { setWorkspaceViewportDimensions(rect); }} onResize={(rect) => { setWorkspaceViewportDimensions(rect); }}
...@@ -79,7 +85,7 @@ class WorkspaceElastic extends Component { ...@@ -79,7 +85,7 @@ class WorkspaceElastic extends Component {
)) ))
} }
</StyledRnd> </StyledRnd>
</div> </Root>
); );
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment