mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 05:05:38 -04:00
- Stack title-hero poster/metadata vertically on mobile (flex-col md:flex-row), switch backdrop tall breakpoint from sm to md - Extract bio expand/collapse logic into reusable ExpandableText component; use it in PersonHero and TitleHero - Fix ContinueWatchingCard image to use fill + sizes instead of fixed width/height to avoid layout shift - Add fade-out gradient on genre chip scrollbar edge on mobile - Show scaled-down ambient glow on mobile instead of hiding it entirely - Humanize knownForDepartment labels (Acting→Actor, Directing→Director, etc.) - Change cast member name from truncate to line-clamp-2 for wrapping - Hide tooltip arrow via [&>:last-child]:hidden instead of color-matching it - Apply safe-area-inset padding to HeroBanner content on notched devices
57 lines
1.7 KiB
TypeScript
57 lines
1.7 KiB
TypeScript
"use client";
|
|
|
|
import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area";
|
|
// biome-ignore lint/correctness/noUnusedImports: shadcn generated
|
|
import * as React from "react";
|
|
|
|
import { cn } from "@/lib/utils";
|
|
|
|
function ScrollArea({
|
|
className,
|
|
children,
|
|
...props
|
|
}: ScrollAreaPrimitive.Root.Props) {
|
|
return (
|
|
<ScrollAreaPrimitive.Root
|
|
data-slot="scroll-area"
|
|
className={cn("relative", className)}
|
|
{...props}
|
|
>
|
|
<ScrollAreaPrimitive.Viewport
|
|
data-slot="scroll-area-viewport"
|
|
className="size-full rounded-[inherit] outline-none transition-[color,box-shadow] focus-visible:outline-1 focus-visible:ring-[3px] focus-visible:ring-ring/50"
|
|
>
|
|
{children}
|
|
</ScrollAreaPrimitive.Viewport>
|
|
<ScrollBar />
|
|
<ScrollAreaPrimitive.Corner />
|
|
</ScrollAreaPrimitive.Root>
|
|
);
|
|
}
|
|
|
|
function ScrollBar({
|
|
className,
|
|
orientation = "vertical",
|
|
...props
|
|
}: ScrollAreaPrimitive.Scrollbar.Props) {
|
|
return (
|
|
<ScrollAreaPrimitive.Scrollbar
|
|
data-slot="scroll-area-scrollbar"
|
|
data-orientation={orientation}
|
|
orientation={orientation}
|
|
className={cn(
|
|
"flex touch-none select-none p-px transition-colors data-horizontal:h-2.5 data-vertical:h-full data-vertical:w-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:border-l data-vertical:border-l-transparent",
|
|
className,
|
|
)}
|
|
{...props}
|
|
>
|
|
<ScrollAreaPrimitive.Thumb
|
|
data-slot="scroll-area-thumb"
|
|
className="relative flex-1 rounded-full bg-border"
|
|
/>
|
|
</ScrollAreaPrimitive.Scrollbar>
|
|
);
|
|
}
|
|
|
|
export { ScrollArea, ScrollBar };
|