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
21 changes: 17 additions & 4 deletions app/vibenet/demos/_components/DemoHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ type DemoHeaderProps = {
title: ReactNode;
description?: ReactNode;
actions?: ReactNode;
/** Tighter spacing and smaller type for demos where the content is the hero. */
compact?: boolean;
};

export function DemoHeader({
Expand All @@ -16,19 +18,30 @@ export function DemoHeader({
title,
description,
actions,
compact = false,
}: DemoHeaderProps) {
return (
<header className="flex flex-col gap-4 border-b border-bds-gray-10 pb-10 dark:border-white/10">
<header
className={
compact
? 'flex flex-col gap-2 border-b border-bds-gray-10 pb-6 dark:border-white/10'
: 'flex flex-col gap-4 border-b border-bds-gray-10 pb-10 dark:border-white/10'
}
>
<div className="flex flex-wrap items-end justify-between gap-4">
<div className="max-w-3xl">
<Text variant="caption" className="mb-4 text-base-blue dark:text-white">
<Text variant="caption" className={`${compact ? 'mb-2' : 'mb-4'} text-base-blue dark:text-white`}>
{eyebrow}
</Text>
<Text variant="display" className="text-balance">
<Text variant={compact ? 'title1' : 'display'} className="text-balance">
{title}
</Text>
{description ? (
<Text variant="body" tone="muted" className="mt-5 max-w-2xl">
<Text
variant={compact ? 'label.regular' : 'body'}
tone="muted"
className={compact ? 'mt-2 max-w-2xl' : 'mt-5 max-w-2xl'}
>
{description}
</Text>
) : null}
Expand Down
Loading
Loading