File size: 711 Bytes
cdc337a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import type { ReactNode } from "react";

import { cn } from "@/shared/lib/cn";

type DataTableShellProps = {
  toolbar: ReactNode;
  children: ReactNode;
  footer?: ReactNode;
  className?: string;
};

export function DataTableShell({ toolbar, children, footer, className }: DataTableShellProps) {
  return (
    <section className={cn("flex min-w-0 flex-col gap-4", className)}>
      <div className="flex min-h-12 flex-wrap items-center justify-between gap-3 py-2">
        {toolbar}
      </div>
      <div className="min-w-0">
        {children}
      </div>
      {footer ? (
        <div className="flex min-h-12 items-center py-2">
          {footer}
        </div>
      ) : null}
    </section>
  );
}