mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-17 23:12:23 +00:00
- Changed all toolbar action components from named exports with curly braces to default exports - Simplified ResetButton by moving template logic to useProblemEditorActions hook - Updated useProblemEditorActions to handle template selection internally using store data - Renamed problem-editor-store import to problem-editor for consistency
35 lines
825 B
TypeScript
35 lines
825 B
TypeScript
import { cn } from "@/lib/utils";
|
|
import {
|
|
CopyButton,
|
|
FormatButton,
|
|
LanguageSelector,
|
|
RedoButton,
|
|
ResetButton,
|
|
UndoButton,
|
|
} from "@/features/problems/code/components/toolbar";
|
|
|
|
interface CodeToolbarProps {
|
|
className?: string;
|
|
}
|
|
|
|
export const CodeToolbar = async ({ className }: CodeToolbarProps) => {
|
|
return (
|
|
<header
|
|
className={cn("relative flex h-8 flex-none items-center", className)}
|
|
>
|
|
<div className="absolute flex w-full items-center justify-between px-2">
|
|
<div className="flex items-center gap-2">
|
|
<LanguageSelector />
|
|
</div>
|
|
<div className="flex items-center gap-2">
|
|
<ResetButton />
|
|
<UndoButton />
|
|
<RedoButton />
|
|
<FormatButton />
|
|
<CopyButton />
|
|
</div>
|
|
</div>
|
|
</header>
|
|
);
|
|
};
|