fix(ui): shop buyer/seller toggle and tabs use btnPrimary/btnDefault directly

Replaces toggleBtnClass/filterChipClass (solid btn-modern--selected fill +
white text) with the exact same classes as the apply-filter button
(tint background, colored border/text) so the selected state matches.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
payacom
2026-09-16 17:24:58 +03:30
parent 3e3351a9c3
commit f18e19aff7

View File

@@ -17,7 +17,7 @@ import ShopCartTab from "@/components/shops/ShopCartTab";
import ShopFavoritesTab from "@/components/shops/ShopFavoritesTab";
import useAxios from "@/hooks/useAxios";
import useInfiniteScroll from "@/hooks/useInfiniteScroll";
import { toggleBtnClass, filterChipClass } from "@/lib/ui/buttonStyles";
import { btnPrimary, btnDefault } from "@/lib/ui/buttonStyles";
import { cn } from "@/lib/utils";
import { staticIconUrl } from "@/components/main/BaseUrl";
import Image from "next/image";
@@ -164,13 +164,13 @@ export default function ShopSettingsPage() {
</div>
<div className="mx-auto mt-4 grid w-full max-w-md grid-cols-2 gap-4">
<RoundedButton
className={cn(toggleBtnClass(filter === FILTER_SELLER), "h-10")}
className={cn(filter === FILTER_SELLER ? btnPrimary : btnDefault, "h-10 text-xs")}
onClick={() => setFilter(FILTER_SELLER)}
>
{t("shops.sellerTab")}
</RoundedButton>
<RoundedButton
className={cn(toggleBtnClass(filter === FILTER_BUYER), "h-10")}
className={cn(filter === FILTER_BUYER ? btnPrimary : btnDefault, "h-10 text-xs")}
onClick={() => setFilter(FILTER_BUYER)}
>
{t("shops.buyerTab")}
@@ -184,7 +184,7 @@ export default function ShopSettingsPage() {
key={tabId}
type="button"
onClick={() => setSellerTab(tabId)}
className={filterChipClass(sellerTab === tabId, "h-10 shrink-0")}
className={cn(sellerTab === tabId ? btnPrimary : btnDefault, "h-10 text-xs shrink-0")}
>
{t(`shops.sellerTabs.${tabId}`)}
</button>
@@ -199,7 +199,7 @@ export default function ShopSettingsPage() {
key={tabId}
type="button"
onClick={() => setBuyerTab(tabId)}
className={filterChipClass(buyerTab === tabId, "h-10 shrink-0")}
className={cn(buyerTab === tabId ? btnPrimary : btnDefault, "h-10 text-xs shrink-0")}
>
{t(`shops.buyerTabs.${tabId}`)}
</button>