mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-10 04:19:32 +00:00
feat: sign-in box
This commit is contained in:
36
docs/components/builder/code-tabs/tab-bar.tsx
Normal file
36
docs/components/builder/code-tabs/tab-bar.tsx
Normal file
@@ -0,0 +1,36 @@
|
||||
import React from "react";
|
||||
import { CodeTab } from "./code-tabs";
|
||||
|
||||
interface File {
|
||||
id: string;
|
||||
name: string;
|
||||
content: string;
|
||||
}
|
||||
|
||||
interface TabBarProps {
|
||||
files: File[];
|
||||
activeFileId: string;
|
||||
onTabClick: (fileId: string) => void;
|
||||
onTabClose: (fileId: string) => void;
|
||||
}
|
||||
|
||||
export function TabBar({
|
||||
files,
|
||||
activeFileId,
|
||||
onTabClick,
|
||||
onTabClose,
|
||||
}: TabBarProps) {
|
||||
return (
|
||||
<div className="flex bg-muted border-b border-border">
|
||||
{files.map((file) => (
|
||||
<CodeTab
|
||||
key={file.id}
|
||||
fileName={file.name}
|
||||
isActive={file.id === activeFileId}
|
||||
onClick={() => onTabClick(file.id)}
|
||||
onClose={() => onTabClose(file.id)}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user