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