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.
 
 

72 lines
1.4 KiB

  1. import * as React from 'react'
  2. import * as T from '@tesseract-design/react-common'
  3. import { RightSidebarStatic } from '@tesseract-design/viewfinder'
  4. import DummyContent from '../../molecules/DummyContent'
  5. import Link from '../../molecules/Link'
  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 RightSidebarLayoutTemplate: React.FC<Props> = ({
  17. query,
  18. userLinkLabel,
  19. searchQueryKey,
  20. searchLabel,
  21. searchHint,
  22. popupQueryKey,
  23. userPopupQueryValue,
  24. }) => {
  25. return (
  26. <RightSidebarStatic.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. sidebarMain={
  57. <RightSidebarStatic.SidebarContainer>
  58. <DummyContent />
  59. </RightSidebarStatic.SidebarContainer>
  60. }
  61. >
  62. <RightSidebarStatic.ContentContainer>
  63. <DummyContent />
  64. </RightSidebarStatic.ContentContainer>
  65. </RightSidebarStatic.Layout>
  66. )
  67. }
  68. export default RightSidebarLayoutTemplate