Add example cover

This commit is contained in:
Lachlan Kermode
2019-02-07 12:21:23 +00:00
parent ed9af1cbf6
commit 4e96d92616
5 changed files with 29 additions and 3 deletions

View File

@@ -14,6 +14,7 @@ import InfoPopUp from './InfoPopup.jsx'
import Timeline from './Timeline.jsx'
import Notification from './Notification.jsx'
import StaticPage from './StaticPage'
import DefaultCover from './presentational/covers/Default'
import { parseDate } from '../js/utilities'
@@ -160,8 +161,9 @@ 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 */}
{/* enable USE_COVER in config.js features, and customise your header */}
{/* pass 'actions.toggleCover' as a prop to your custom header */}
<DefaultCover showAppHandler={actions.toggleCover} />
</StaticPage>
)}
<LoadingOverlay

View File

@@ -0,0 +1,16 @@
import React from 'react'
export default ({ showAppHandler }) => (
<div className='default-cover-container'>
<h3>Here's an example cover.</h3>
<p>Replace it with a more descriptive one:</p>
<ul>
<li>Create a new component in <code>components/presentational/covers</code>.</li>
<li>Import in in <code>components/Dashboard.jsx</code> in the <code>render</code> function.</li>
</ul>
<br /><br />
<div>
<button onClick={showAppHandler}>Go to app</button>
</div>
</div>
)