ProductMenuBar.tsx 809 B

1234567891011121314151617181920212223242526272829
  1. import { PropsWithChildren } from 'react'
  2. import { cn } from 'ui'
  3. interface ProductMenuBarProps {
  4. title: string
  5. className?: string
  6. }
  7. const ProductMenuBar = ({ title, children, className }: PropsWithChildren<ProductMenuBarProps>) => {
  8. return (
  9. <div
  10. /**
  11. * id used in playwright-tests/tests/snapshot/spec/table-editor.spec.ts
  12. * */
  13. id="spec-click-target"
  14. className={cn(
  15. 'flex flex-col w-full h-full', // Layout
  16. 'hide-scrollbar bg-dash-sidebar border-default'
  17. )}
  18. >
  19. <div className="border-default flex min-h-(--header-height) items-center border-b px-6">
  20. <h4 className="text-lg">{title}</h4>
  21. </div>
  22. <div className={cn('grow overflow-y-auto', className)}>{children}</div>
  23. </div>
  24. )
  25. }
  26. export default ProductMenuBar