SaaS fixes (#6578)

Co-authored-by: Claude Opus 4.8 <[email protected]>
Co-authored-by: James Brunton <[email protected]>
Co-authored-by: Reece Browne <[email protected]>
Co-authored-by: ConnorYoh <[email protected]>
Co-authored-by: Reece <[email protected]>
Co-authored-by: EthanHealy01 <[email protected]>
Co-authored-by: Ludy <[email protected]>
This commit is contained in:
Anthony Stirling
2026-06-16 16:41:25 +01:00
committed by GitHub
co-authored by Claude Opus 4.8 James Brunton Reece Browne ConnorYoh Reece EthanHealy01 Ludy
parent 96accea984
commit ddf78d11ae
415 changed files with 29552 additions and 5855 deletions
+16 -2
View File
@@ -1,6 +1,8 @@
import type { ReactNode } from "react";
import "@shared/components/NavItem.css";
export type NavItemAccent = "blue" | "purple" | "green" | "amber" | "red";
export interface NavItemProps {
/** Stable view id passed to the click handler. */
id: string;
@@ -8,6 +10,11 @@ export interface NavItemProps {
icon?: ReactNode;
/** Show the active highlight (navActive background, navActiveText colour). */
isActive?: boolean;
/**
* Optional status accent: draws a left edge bar in the tone colour and tints
* the leading icon to match. For listing live/paused/etc. entities.
*/
accent?: NavItemAccent;
/** Optional trailing badge (e.g. unread count, "new"). */
trailing?: ReactNode;
onClick?: (id: string) => void;
@@ -19,13 +26,14 @@ export interface NavItemProps {
*
* Active styling: navActive background, navActiveText colour, weight 500.
* Hover styling: navHover background, navHoverText colour (only when not
* already active).
* already active). An optional `accent` adds a status edge bar + icon tint.
*/
export function NavItem({
id,
label,
icon,
isActive,
accent,
trailing,
onClick,
className,
@@ -34,9 +42,15 @@ export function NavItem({
<button
type="button"
onClick={() => onClick?.(id)}
className={["sui-navitem", isActive ? "is-active" : "", className ?? ""]
className={[
"sui-navitem",
isActive ? "is-active" : "",
accent ? "sui-navitem--accent" : "",
className ?? "",
]
.filter(Boolean)
.join(" ")}
data-accent={accent}
aria-current={isActive ? "page" : undefined}
>
{icon && (