fix category active item
This commit is contained in:
@@ -4,9 +4,9 @@ import { Category } from "@/app/[name]/(Main)/types/Types";
|
||||
import CategoryItemRenderer from "@/components/listview/CategoryItemRenderer";
|
||||
import CategorySmallItemRenderer from "@/components/listview/CategorySmallItemRenderer";
|
||||
import HorizontalScrollView from "@/components/listview/HorizontalScrollView";
|
||||
import { GLASS_SURFACE_DISABLED, GLASS_SURFACE_SELECTED } from "@/lib/styles/glassSurface";
|
||||
import clsx from "clsx";
|
||||
import { usePathname } from "next/navigation";
|
||||
import { GLASS_SURFACE_DISABLED, GLASS_SURFACE_SELECTED } from "@/lib/styles/glassSurface";
|
||||
|
||||
/** TODO: remove when backend sends avatarRenderMode */
|
||||
const COLORED_SVG_RESTAURANT_SLUGS = new Set(["havasone"]);
|
||||
@@ -114,11 +114,7 @@ const CategoryScroll = ({ categories, selectedCategory, onSelect, variant = "lar
|
||||
return (
|
||||
<Renderer
|
||||
key={item.id}
|
||||
className={clsx(
|
||||
isDisabled && GLASS_SURFACE_DISABLED,
|
||||
isDisabled && "cursor-not-allowed",
|
||||
isSelected && !isDisabled && GLASS_SURFACE_SELECTED,
|
||||
)}
|
||||
className={clsx(!isSelected && GLASS_SURFACE_DISABLED, isDisabled && "cursor-not-allowed", isSelected && !isDisabled && GLASS_SURFACE_SELECTED)}
|
||||
onClick={isDisabled ? undefined : handleSelect(item.id)}
|
||||
aria-disabled={isDisabled}
|
||||
>
|
||||
|
||||
+2
-12
@@ -48,12 +48,7 @@ html[data-theme="dark"] .glass-surface--selected {
|
||||
inset: 0;
|
||||
border-radius: inherit;
|
||||
padding: 2px;
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
rgba(255, 255, 255, 1) 0%,
|
||||
rgba(255, 253, 253, 0) 50%,
|
||||
rgba(255, 255, 255, 1) 100%
|
||||
);
|
||||
background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 253, 253, 0) 50%, rgba(255, 255, 255, 1) 100%);
|
||||
-webkit-mask:
|
||||
linear-gradient(#fff 0 0) content-box,
|
||||
linear-gradient(#fff 0 0);
|
||||
@@ -76,12 +71,7 @@ html[data-theme="dark"] .glass-surface--disabled {
|
||||
}
|
||||
|
||||
html[data-theme="dark"] .glass-surface--disabled::before {
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
rgba(255, 255, 255, 0.35) 0%,
|
||||
rgba(255, 255, 255, 0) 50%,
|
||||
rgba(255, 255, 255, 0.35) 100%
|
||||
);
|
||||
background: linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 50%, rgba(255, 255, 255, 0.35) 100%);
|
||||
}
|
||||
|
||||
.glass-surface-nav {
|
||||
|
||||
Reference in New Issue
Block a user