Template for starting apps, powered by Next.js
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

67 lines
1.2 KiB

  1. import * as React from 'react'
  2. import * as T from '@tesseract-design/react-common'
  3. import { Basic } from '@tesseract-design/viewfinder'
  4. import Link from '../../molecules/Link'
  5. import DummyContent from '../../molecules/DummyContent'
  6. import Brand from '../../molecules/Brand'
  7. type Props = {
  8. query: string,
  9. userLinkLabel: string,
  10. searchQueryKey: string,
  11. searchLabel: string,
  12. searchHint: string,
  13. popupQueryKey: string,
  14. userPopupQueryValue: string,
  15. }
  16. const BasicLayoutTemplate: React.FC<Props> = ({
  17. query,
  18. userLinkLabel,
  19. searchQueryKey,
  20. searchLabel,
  21. searchHint,
  22. popupQueryKey,
  23. userPopupQueryValue,
  24. }) => {
  25. return (
  26. <Basic.Layout
  27. brand={
  28. <Brand />
  29. }
  30. topBarCenter={
  31. <form>
  32. <T.TextInput
  33. name={searchQueryKey}
  34. label={searchLabel}
  35. hint={searchHint}
  36. defaultValue={query}
  37. border
  38. alternate
  39. />
  40. </form>
  41. }
  42. userLink={
  43. <Link
  44. href={{
  45. query: {
  46. [popupQueryKey]: userPopupQueryValue,
  47. },
  48. }}
  49. >
  50. <T.Icon
  51. name="user"
  52. label={userLinkLabel}
  53. />
  54. </Link>
  55. }
  56. >
  57. <Basic.ContentContainer>
  58. <DummyContent />
  59. </Basic.ContentContainer>
  60. </Basic.Layout>
  61. )
  62. }
  63. export default BasicLayoutTemplate