App for making pecha kucha presentations.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 

88 lignes
1.6 KiB

  1. import * as React from 'react'
  2. import styled from 'styled-components'
  3. import * as T from '@tesseract-design/react-common'
  4. import {Basic} from '@theoryofnekomata/viewfinder'
  5. import Link from '../../molecules/Link'
  6. import DummyContent from '../../molecules/DummyContent'
  7. import Brand from '../../molecules/Brand'
  8. const TopBarComponent = styled('div')({
  9. backgroundColor: 'var(--color-bg, white)',
  10. '::before': {
  11. content: "''",
  12. width: '100%',
  13. height: '100%',
  14. position: 'absolute',
  15. top: 0,
  16. left: 0,
  17. pointerEvents: 'none',
  18. },
  19. '::after': {
  20. backgroundColor: 'black',
  21. opacity: 0.5,
  22. content: "''",
  23. width: '100%',
  24. height: '100%',
  25. position: 'absolute',
  26. top: 0,
  27. left: 0,
  28. pointerEvents: 'none',
  29. },
  30. })
  31. type Props = {
  32. query: string
  33. userLinkLabel: string
  34. searchQueryKey: string
  35. searchLabel: string
  36. searchHint: string
  37. popupQueryKey: string
  38. userPopupQueryValue: string
  39. }
  40. const BasicLayoutTemplate: React.FC<Props> = ({
  41. query,
  42. userLinkLabel,
  43. searchQueryKey,
  44. searchLabel,
  45. searchHint,
  46. popupQueryKey,
  47. userPopupQueryValue,
  48. }) => {
  49. return (
  50. <Basic.Layout
  51. topBarComponent={TopBarComponent}
  52. brand={<Brand />}
  53. topBarCenter={
  54. <form>
  55. <T.TextInput
  56. name={searchQueryKey}
  57. label={searchLabel}
  58. hint={searchHint}
  59. defaultValue={query}
  60. border
  61. alternate
  62. />
  63. </form>
  64. }
  65. userLink={
  66. <Link
  67. href={{
  68. query: {
  69. [popupQueryKey]: userPopupQueryValue,
  70. },
  71. }}
  72. >
  73. <T.Icon name="user" label={userLinkLabel} />
  74. </Link>
  75. }
  76. >
  77. <Basic.ContentContainer>
  78. <DummyContent />
  79. </Basic.ContentContainer>
  80. </Basic.Layout>
  81. )
  82. }
  83. export default BasicLayoutTemplate