fix: type errors
This commit is contained in:
1 parent
6631530dcb
commit
f4c06cbc95
4 files changed
+18
-27
No files matched your search
@@ -8,13 +8,9 @@ import { expect, test } from "vitest";
|
||||
import { PortalShell } from "@/components/layout/portal-shell";
|
||||
import { BrandLogo } from "./logo";
|
||||
|
||||
test("uses each supplied logo's true intrinsic dimensions", () => {
|
||||
const { rerender } = render(<BrandLogo variant="white" />);
|
||||
test("uses the supplied logo's true intrinsic dimensions", () => {
|
||||
render(<BrandLogo />);
|
||||
const logo = screen.getByAltText("Leon Tonhäuser Sportfotografie");
|
||||
expect(logo.getAttribute("width")).toBe("250");
|
||||
expect(logo.getAttribute("height")).toBe("250");
|
||||
|
||||
rerender(<BrandLogo variant="black" />);
|
||||
expect(logo.getAttribute("width")).toBe("1000");
|
||||
expect(logo.getAttribute("height")).toBe("1000");
|
||||
});
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
import React from "react";
|
||||
|
||||
type PageHeaderProps = {
|
||||
kicker: string;
|
||||
kicker?: string;
|
||||
title: string;
|
||||
description?: string;
|
||||
titleId?: string;
|
||||
children?: React.ReactNode;
|
||||
};
|
||||
|
||||
export function PageHeader({ kicker, title, description }: PageHeaderProps) {
|
||||
export function PageHeader({ kicker, title, description, titleId, children }: PageHeaderProps) {
|
||||
return (
|
||||
<div className="editorial-section">
|
||||
<p className="editorial-kicker text-sm font-semibold text-muted-foreground tracking-widest uppercase mb-2">{kicker}</p>
|
||||
{kicker && <p className="editorial-kicker text-sm font-semibold text-muted-foreground tracking-widest uppercase mb-2">{kicker}</p>}
|
||||
<div className="editorial-title-row mb-6">
|
||||
<h1 className="text-4xl font-bold tracking-tight text-foreground">{title}</h1>
|
||||
<h1 id={titleId} className="text-4xl font-bold tracking-tight text-foreground">{title}</h1>
|
||||
{children}
|
||||
</div>
|
||||
{description && (
|
||||
<p className="text-lg text-muted-foreground max-w-3xl mb-8">
|
||||
|
||||
Reference in new issue
Block a user