diff --git a/src/components/Header.tsx b/src/components/Header.tsx index a2cbdbc8..c3a626aa 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -2,36 +2,7 @@ import { Link } from "react-router-dom"; import { SidebarTrigger } from "./ui/sidebar"; import { Separator } from "./ui/separator"; import { HoverPopover } from "./HoverPopover"; - -// function HeaderMenuItem({ children }: { children: React.ReactNode }) { -// return ( -//
-// {children} -//
-// ); -// } - -// function DropdownMenu({ children }: { children: React.ReactNode }) { -// return ( -//
-//
{children}
-//
-// ); -// } - -// function DropdownMenuItem({ -// children, -// to, -// }: { -// to: string; -// children: React.ReactNode; -// }) { -// return ( -// -// {children} -// -// ); -// } +import { ButtonDarkMode } from "@stacklok/ui-kit"; export function Header({ hasError }: { hasError?: boolean }) { return ( @@ -97,6 +68,8 @@ export function Header({ hasError }: { hasError?: boolean }) { + + ); diff --git a/src/components/__tests__/ErrorBoundary.test.tsx b/src/components/__tests__/ErrorBoundary.test.tsx index 31f731f3..ae78f176 100644 --- a/src/components/__tests__/ErrorBoundary.test.tsx +++ b/src/components/__tests__/ErrorBoundary.test.tsx @@ -1,8 +1,8 @@ -import { render } from "@/lib/test-utils"; import { screen } from "@testing-library/react"; import { describe, expect, it, vi } from "vitest"; import ErrorBoundary from "../ErrorBoundary"; import { Error } from "../Error"; +import { render } from "@/lib/test-utils"; const ErrorComponent = () => { throw Error(); diff --git a/src/lib/test-utils.tsx b/src/lib/test-utils.tsx index f6880dbf..a13ba7a5 100644 --- a/src/lib/test-utils.tsx +++ b/src/lib/test-utils.tsx @@ -1,4 +1,5 @@ import { SidebarProvider } from "@/components/ui/sidebar"; +import { DarkModeProvider } from "@stacklok/ui-kit"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { RenderOptions, render } from "@testing-library/react"; import React from "react"; @@ -31,14 +32,16 @@ const renderWithProviders = ( }) } > - - - {children}} - /> - - + + + + {children}} + /> + + + , ); diff --git a/src/main.tsx b/src/main.tsx index 215fac75..8ee3833d 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1,24 +1,27 @@ import { StrictMode } from "react"; import { createRoot } from "react-dom/client"; import "./index.css"; -import '@stacklok/ui-kit/style' +import "@stacklok/ui-kit/style"; import App from "./App.tsx"; import { BrowserRouter } from "react-router-dom"; import { SidebarProvider } from "./components/ui/sidebar.tsx"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import ErrorBoundary from "./components/ErrorBoundary.tsx"; import { Error } from "./components/Error.tsx"; +import { DarkModeProvider } from "@stacklok/ui-kit"; createRoot(document.getElementById("root")!).render( - - }> - - - - - + + + }> + + + + + + );