add cover with toggle

This commit is contained in:
Lachlan Kermode
2019-02-07 12:04:47 +00:00
parent 4badf11999
commit ed9af1cbf6
10 changed files with 85 additions and 60 deletions

View File

@@ -13,6 +13,7 @@ import NarrativeControls from './presentational/Narrative/Controls.js'
import InfoPopUp from './InfoPopup.jsx'
import Timeline from './Timeline.jsx'
import Notification from './Notification.jsx'
import StaticPage from './StaticPage'
import { parseDate } from '../js/utilities'
@@ -157,6 +158,12 @@ class Dashboard extends React.Component {
}
/>
) : null}
{process.env.features.USE_COVER && (
<StaticPage showing={app.flags.isCover}>
{/* enable USE_COVER in config.js features, and put content here if you want a header */}
{/* pass 'actions.toggleCover' as a prop to your custom header */}
</StaticPage>
)}
<LoadingOverlay
ui={app.flags.isFetchingDomain}
language={app.language}

View File

@@ -0,0 +1,9 @@
import React from 'react'
export default ({ showing, children }) => {
return (
<div className={`cover-container ${showing ? 'showing' : ''}`}>
{children}
</div>
)
}