feat: enhance ExpandableScreen close button styling with utility function and update global styles for drawer height

This commit is contained in:
Marco Pedone 2026-01-08 10:42:55 +01:00
parent 352c31d03a
commit 5a1b9d0340
2 changed files with 10 additions and 4 deletions

View file

@ -9,6 +9,7 @@ import {
useEffect, useEffect,
useState, useState,
} from "react"; } from "react";
import { cn } from "~/lib/utils";
// Context // Context
interface ExpandableScreenContextValue { interface ExpandableScreenContextValue {
@ -184,10 +185,11 @@ export function ExpandableScreenContent({
{showCloseButton && ( {showCloseButton && (
<motion.button <motion.button
aria-label="Close" aria-label="Close"
className={`absolute top-6 right-6 z-30 flex h-10 w-10 cursor-pointer items-center justify-center rounded-full transition-colors ${ className={cn(
closeButtonClassName || "absolute top-6 right-6 z-30 flex h-10 w-10 cursor-pointer items-center justify-center rounded-full transition-colors",
"bg-transparent text-white hover:bg-white/10 dark:text-primary-foreground hover:dark:bg-primary-foreground/10" "bg-transparent text-white hover:bg-white/10 dark:text-primary-foreground hover:dark:bg-primary-foreground/10",
}`} closeButtonClassName,
)}
onClick={collapse} onClick={collapse}
> >
<X className="h-5 w-5" /> <X className="h-5 w-5" />

View file

@ -313,6 +313,10 @@
/* .leaflet-control-attribution { /* .leaflet-control-attribution {
@apply !sr-only; @apply !sr-only;
} */ } */
[data-vaul-drawer][data-vaul-drawer-direction="bottom"] {
@apply !max-h-[90vh];
}
} }
@utility dropdown-override { @utility dropdown-override {