Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions apps/www/components/page/logo.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,35 +14,6 @@ describe("Logo", () => {
expect(logoText).toBeInTheDocument();
});

it("renders the logo icon", () => {
render(<Logo />);
// Check for the image element
const img = document.querySelector("img");
expect(img).toBeInTheDocument();
expect(img).toHaveAttribute(
"src",
expect.stringContaining("/assets/icon.svg"),
);
});

it("applies default styling classes", () => {
render(<Logo />);

const container = screen.getByText("ArkEnv").parentElement;
expect(container).toHaveClass("flex");
expect(container).toHaveClass("items-center");
expect(container).toHaveClass("gap-2");

const text = screen.getByText("ArkEnv");
expect(text).toHaveClass("font-medium");
expect(text).toHaveClass("text-fd-foreground");
expect(text).toHaveClass("text-sm");

const img = document.querySelector("img");
// next/image might apply styles differently, but we passed className="size-6"
expect(img).toHaveClass("size-6");
});

it("accepts custom className", () => {
render(<Logo className="custom-class" />);

Expand Down
37 changes: 30 additions & 7 deletions apps/www/components/page/logo.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Image from "next/image";
import { cn } from "~/lib/utils";

/**
Expand All @@ -10,14 +9,38 @@ import { cn } from "~/lib/utils";
export function Logo({ className }: { className?: string }) {
return (
<div className={cn("flex items-center gap-2", className)}>
<Image
src="/assets/icon.svg"
alt=""
<svg
width="24"
height="24"
viewBox="0 0 12 12"
xmlns="http://www.w3.org/2000/svg"
aria-hidden="true"
width={24}
height={24}
className="size-6"
/>
>
<path
className="stroke-blue-500 dark:stroke-blue-400"
style={{
fill: "none",
strokeWidth: 0.99975,
strokeLinecap: "round",
strokeLinejoin: "round",
strokeMiterlimit: 10,
strokeDasharray: "none",
strokeOpacity: 1,
}}
d="M8.5 6c0-1.379-1.121-2.5-2.5-2.5A2.502 2.502 0 0 0 3.5 6c0 1.379 1.121 2.5 2.5 2.5S8.5 7.379 8.5 6ZM6 11V8.5M1 6h2.5m5 0H11M6 3.5V1M2.464 2.464l1.768 1.768m3.536 3.536 1.768 1.768m-7.072 0 1.768-1.768m3.536-3.536 1.768-1.768"
/>
<path
className="fill-blue-500 dark:fill-blue-400"
style={{
fillOpacity: 1,
fillRule: "nonzero",
stroke: "none",
strokeWidth: 1,
}}
d="M6 5.102a.899.899 0 1 0 0 1.797.899.899 0 0 0 0-1.797Z"
/>
</svg>
<span className="text-fd-foreground font-medium text-sm">ArkEnv</span>
</div>
);
Expand Down
Loading