File size: 727 Bytes
ec51066
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
30
31
import { Page } from "@/types";
import { ListPagesItem } from "./page";

export function ListPages({
  pages,
  currentPage,
  onSelectPage,
  onDeletePage,
}: {
  pages: Array<Page>;
  currentPage: string;
  onSelectPage: (path: string, newPath?: string) => void;
  onNewPage: () => void;
  onDeletePage: (path: string) => void;
}) {
  return (
    <div className="w-full flex items-center justify-start bg-neutral-950 overflow-auto flex-nowrap min-h-[44px]">
      {pages.map((page, i) => (
        <ListPagesItem
          key={i}
          page={page}
          currentPage={currentPage}
          onSelectPage={onSelectPage}
          onDeletePage={onDeletePage}
          index={i}
        />
      ))}
    </div>
  );
}