Skip to content
Snippets Groups Projects
Unverified Commit b924302b authored by Justin Coyne's avatar Justin Coyne Committed by GitHub
Browse files

Merge pull request #3837 from ProjectMirador/mui5-window

Pull Window styles up
parents 66bce438 08760874
No related branches found
No related tags found
2 merge requests!19Draft: Merge video support into mui5,!18Only nudge over badge content for the WindowListButton; it needs special...
......@@ -12,6 +12,23 @@ import ErrorContent from '../containers/ErrorContent';
import IIIFAuthentication from '../containers/IIIFAuthentication';
import { PluginHook } from './PluginHook';
const Root = styled(Paper)(({ ownerState, theme }) => ({
backgroundColor: theme.palette.shades?.dark,
borderRadius: 0,
display: 'flex',
flexDirection: 'column',
height: '100%',
minHeight: 0,
overflow: 'hidden',
width: '100%',
...(ownerState?.maximized && {
left: 0,
position: 'absolute',
top: 0,
zIndex: theme.zIndex.modal - 1,
}),
}));
const StyledMiddle = styled('div')(() => ({
display: 'flex',
flex: '1',
......@@ -96,7 +113,7 @@ export class Window extends Component {
*/
render() {
const {
focusWindow, label, isFetching, maximized, sideBarOpen,
focusWindow, label, isFetching, sideBarOpen,
view, windowId, t,
manifestError,
} = this.props;
......@@ -112,27 +129,12 @@ export class Window extends Component {
}
return (
<Paper
<Root
onFocus={focusWindow}
ownerState={this.props}
component="section"
elevation={1}
id={windowId}
sx={theme => ({
bgcolor: 'shades?.dark',
borderRadius: 0,
display: 'flex',
flexDirection: 'column',
height: '100%',
minHeight: 0,
overflow: 'hidden',
width: '100%',
...(maximized && {
left: 0,
position: 'absolute',
top: 0,
zIndex: theme.zIndex.modal - 1,
}),
})}
className={ns('window')}
aria-label={t('window', { label })}
>
......@@ -159,7 +161,7 @@ export class Window extends Component {
</StyledMiddle>
<CompanionArea windowId={windowId} position="far-bottom" />
<PluginHook {...this.props} />
</Paper>
</Root>
);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment