TitleScreen.jsx 824 B

12345678910111213141516171819
  1. import { h, render } from 'preact'; // eslint-disable-line no-unused-vars
  2. // shared Title component
  3. // displays intro text and a link to start the module
  4. const TitleScreen = props => ( // eslint-disable-line no-unused-vars
  5. <section class="wrapper">
  6. <header className="header">
  7. <div className="number--square number--square--huge"><span>{props.number}</span></div>
  8. <h1 className="header__title">{props.title}</h1>
  9. </header>
  10. <main className="intro">{props.introtext.split('\n').map(item => <span>{item}<br /></span>)}</main>
  11. <footer className="footer footer--titlescreen">
  12. { !props.isFetching ? <a href="#" title="Start" className="button--wide" onClick={() => props.navigate(props.navigateTo)}>
  13. {props.start}</a> : [] }
  14. </footer>
  15. </section>
  16. );
  17. export default TitleScreen;