Common front-end components for Web using the Tesseract design system, written for React. https://make.modal.sh/tesseract/web/react/common
 
 
 
 

41 lines
783 B

  1. import * as React from 'react'
  2. import styled from 'styled-components'
  3. import sidebar from '../sidebar.json'
  4. import brand from '../../brand'
  5. import Sidebar from '../components/Sidebar/Sidebar'
  6. import '../../public/global.css'
  7. import '../../public/theme/dark.css'
  8. const Container = styled('div')({
  9. maxWidth: 720,
  10. margin: '0 auto',
  11. padding: '0 1rem',
  12. boxSizing: 'border-box',
  13. })
  14. type AppProps = {
  15. Component: React.ElementType,
  16. pageProps: Record<string, unknown>,
  17. }
  18. const App: React.FC<AppProps> = ({
  19. Component,
  20. pageProps,
  21. }) => (
  22. <React.Fragment>
  23. <Sidebar
  24. brand={brand}
  25. data={sidebar}
  26. />
  27. <main>
  28. <Container>
  29. <Component
  30. {...pageProps}
  31. />
  32. </Container>
  33. </main>
  34. </React.Fragment>
  35. )
  36. export default App