First Commit

This commit is contained in:
2026-09-12 13:56:36 +01:00
commit 4d75af0418
426 changed files with 36452 additions and 0 deletions
+52
View File
@@ -0,0 +1,52 @@
import H1 from "@/src/components/twui/layout/H1";
import Section from "@/src/components/twui/layout/Section";
import { useContext, type ReactNode } from "react";
import Row from "../twui/layout/Row";
import Stack from "../twui/layout/Stack";
import Divider from "../twui/layout/Divider";
import Breadcrumbs from "../twui/elements/Breadcrumbs";
import { AppContext } from "@/src/pages/__root";
import Span from "../twui/layout/Span";
type Props = {
title: string;
description?: string | ReactNode;
buttons?: ReactNode;
};
export default function AdminHero({ title, description, buttons }: Props) {
const { pageProps } = useContext(AppContext);
return (
<Section>
<Stack className="w-full items-stretch">
<Row className="w-full justify-between items-start">
<Stack>
<H1>{title}</H1>
{description ? (
typeof description == "string" ? (
<Span>{description}</Span>
) : (
description
)
) : null}
<Breadcrumbs
dividerProps={{
className: "-skew-10",
}}
currentLinkProps={{
className:
"text-slate-400! pointer-events-none",
}}
pageUrl={pageProps?.url?.pathname}
backButton
skipHome
/>
</Stack>
<Row>{buttons}</Row>
</Row>
<Divider className="my-4" />
</Stack>
</Section>
);
}