Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render overlay close button before contents #281

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Render overlay close button before contents
  • Loading branch information
henrycatalinismith committed Oct 15, 2022
commit 2d6d8371f50d9351bbaa018416bf2b0416236c48
12 changes: 7 additions & 5 deletions src/components/overlays/OverlayStack.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ export default class OverlayStack extends React.Component {
let overlayData = this.props.overlay;
if (overlayData) {
let OverlayComponent = resolveOverlay(overlayData.get('type'));
content = [
<div key="overlay" className="OverlayStack-overlay">
<OverlayComponent config={ overlayData.get('config') }/>
</div>,
];
content = [];

if (overlayData.getIn(['config', 'closeButton'], true)) {
content.push(
Expand All @@ -31,6 +27,12 @@ export default class OverlayStack extends React.Component {
</button>
);
}

content.push(
<div key="overlay" className="OverlayStack-overlay">
<OverlayComponent config={ overlayData.get('config') }/>
</div>,
);
}

return (
Expand Down