From c1e28224aa2e1450031669d9a7e359b63e04687d Mon Sep 17 00:00:00 2001 From: Volpeon Date: Wed, 22 Jul 2026 19:40:59 +0200 Subject: Init --- src/ui/objects/SideNavItem.tsx | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/ui/objects/SideNavItem.tsx (limited to 'src/ui/objects/SideNavItem.tsx') diff --git a/src/ui/objects/SideNavItem.tsx b/src/ui/objects/SideNavItem.tsx new file mode 100644 index 0000000..fb8f523 --- /dev/null +++ b/src/ui/objects/SideNavItem.tsx @@ -0,0 +1,33 @@ +import type { HTMLTag, Polymorphic } from "corvos/plugins/jsx.ts"; + +export type Props = Polymorphic<{ + as: Tag; + icon?: JSX.Element; + pre?: JSX.Element; + post?: JSX.Element; + selected?: boolean; +}>; + +export const SideNavItem = ({ + children, + as: Tag = "a" as T, + icon, + pre, + post, + selected, + class: cls, + ...props +}: Props) => ( + + {icon &&
{icon}
} + +
+ {pre} {children} {post} +
+
+); -- cgit v1.3.1