mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-18 15:26:33 +00:00
feat(layout): add footer components for ProblemDescription and ProblemSolution layouts
This commit is contained in:
parent
037f8f625d
commit
b39350d5a7
@ -0,0 +1,21 @@
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
interface ProblemDescriptionFooterProps {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export default function ProblemDescriptionFooter({
|
||||
className,
|
||||
...props
|
||||
}: ProblemDescriptionFooterProps) {
|
||||
return (
|
||||
<footer
|
||||
{...props}
|
||||
className={cn("h-9 flex flex-none items-center bg-muted", className)}
|
||||
>
|
||||
<div className="w-full flex items-center justify-center">
|
||||
Description of Two Sum
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
}
|
@ -1,3 +1,5 @@
|
||||
import ProblemDescriptionFooter from "./components/footer";
|
||||
|
||||
interface ProblemDescriptionLayoutProps {
|
||||
children: React.ReactNode;
|
||||
}
|
||||
@ -7,7 +9,10 @@ export default function ProblemDescriptionLayout({
|
||||
}: ProblemDescriptionLayoutProps) {
|
||||
return (
|
||||
<div className="h-full flex flex-col">
|
||||
{children}
|
||||
<div className="flex-1">
|
||||
{children}
|
||||
</div>
|
||||
<ProblemDescriptionFooter />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -0,0 +1,21 @@
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
interface ProblemSolutionFooterProps {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export default function ProblemSolutionFooter({
|
||||
className,
|
||||
...props
|
||||
}: ProblemSolutionFooterProps) {
|
||||
return (
|
||||
<footer
|
||||
{...props}
|
||||
className={cn("h-9 flex flex-none items-center bg-muted", className)}
|
||||
>
|
||||
<div className="w-full flex items-center justify-center">
|
||||
Solution of Two Sum
|
||||
</div>
|
||||
</footer>
|
||||
);
|
||||
}
|
@ -1,3 +1,5 @@
|
||||
import ProblemSolutionFooter from "./components/footer";
|
||||
|
||||
interface ProblemSolutionLayoutProps {
|
||||
children: React.ReactNode;
|
||||
}
|
||||
@ -7,7 +9,10 @@ export default function ProblemSolutionLayout({
|
||||
}: ProblemSolutionLayoutProps) {
|
||||
return (
|
||||
<div className="h-full flex flex-col">
|
||||
{children}
|
||||
<div className="flex-1">
|
||||
{children}
|
||||
</div>
|
||||
<ProblemSolutionFooter />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user