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