nyuchimzizi
Mzizi — an open-architecture project of the Bundu Foundation, operated and developed by Nyuchi. Built on the Five African Minerals palette.
Built by Nyuchi Africav4.0.39
Audit event display with actor, action, target, timestamp.
No interactive demo is registered for this component yet — the source is shown directly.
import * as React from "react"
import { cn } from "@/lib/utils"
const severityStyles = {
info: "text-[var(--color-primary, var(--color-cobalt, #00B0FF))]",
warning: "text-[var(--status-warning, var(--color-gold, #FFD740))]",
error: "text-destructive",
critical: "text-destructive font-semibold",
} as const
function AuditLogEntry({ loading = false,
actor,
action,
target,
timestamp,
ip,
severity = "info",
className,
...props
}: {
actor: string
action: string
target?: string
timestamp: string
ip?: string
severity?: "info" | "warning" | "error" | "critical"
} & React.ComponentProps<"div">) {
return (
<div
data-slot="audit-log-entry" data-portal="https://design.nyuchi.com/components/audit-log-entry"
data-severity={severity}
className={cn("flex items-center gap-3 py-2 text-sm", className)}
{...props}
>
<span
className={cn("size-1.5 shrink-0 rounded-full", {
"bg-[var(--color-primary, var(--color-cobalt, #00B0FF))]": severity === "info",
"bg-[var(--status-warning, var(--color-gold, #FFD740))]": severity === "warning",
"bg-destructive": severity === "error" || severity === "critical",
})}
/>
<span className="min-w-0 flex-1">
<span className="font-medium text-foreground">{actor}</span>
<span className={cn("mx-1.5", severityStyles[severity])}>{action}</span>
{target && <span className="font-medium text-foreground">{target}</span>}
</span>
{ip && <span className="shrink-0 font-mono text-xs text-muted-foreground">{ip}</span>}
<span className="shrink-0 text-xs text-muted-foreground">{timestamp}</span>
</div>
)
}
export { AuditLogEntry }
The variants, sizes, and props surfaced by the registry. Each is sourced from the Supabase component_docs table.
Hit the registry API live and see the JSON the shadcn CLI consumes when it installs this component.
/api/v1/ui/audit-log-entrynpx shadcn@latest add https://mzizi.dev/api/v1/ui/audit-log-entrycomponents/ui/audit-log-entry.tsx