Skip to content

Commit 81b77bc

Browse files
Update BeastMarketFilters.tsx
1 parent f084b1c commit 81b77bc

File tree

1 file changed

+41
-32
lines changed

1 file changed

+41
-32
lines changed

components/ui/BeastMarketFilters/BeastMarketFilters.tsx

Lines changed: 41 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ const Switch = styled.label`
9292
display: inline-block;
9393
width: 36px;
9494
height: 20px;
95-
margin: 1rem 0;
95+
margin: 0.8rem 0;
9696
`
9797
const SwitchSlider = styled.span`
9898
position: absolute;
@@ -151,7 +151,10 @@ const sortOptions = [
151151
{ name: "Price: Low to High", href: "#", current: false },
152152
{ name: "Price: High to Low", href: "#", current: false },
153153
]
154-
const subCategories = [{ name: "Favorites", href: "#" }]
154+
const subCategories = [
155+
{ name: "Favorites", href: "#" },
156+
{ name: "Owned", href: "#" },
157+
]
155158

156159
function classNames(...classes: any) {
157160
return classes.filter(Boolean).join(" ")
@@ -294,22 +297,24 @@ const BeastMarketFilters: FC<Props> = ({
294297
{/* Filters */}
295298
<form className="mt-4 border-t">
296299
<h3 className="sr-only">Categories</h3>
297-
<ul role="list" className="px-2 py-3 font-medium ">
300+
<ul role="list" className="px-2 py-2 font-medium ">
298301
{subCategories.map((category) => (
299302
<li key={category.name}>
300-
<a href={category.href} className="block px-2 py-3">
303+
<a href={category.href} className="block px-2 py-2">
301304
{category.name}
302305
</a>
303-
<Switch>
304-
<SwitchInput
305-
defaultChecked={favoriteToggled}
306-
type="checkbox"
307-
onChange={() =>
308-
setFavoriteToggled(!favoriteToggled)
309-
}
310-
/>
311-
<SwitchSlider></SwitchSlider>
312-
</Switch>
306+
{category.name == "Favorites" && (
307+
<Switch>
308+
<SwitchInput
309+
defaultChecked={favoriteToggled}
310+
type="checkbox"
311+
onChange={() =>
312+
setFavoriteToggled(!favoriteToggled)
313+
}
314+
/>
315+
<SwitchSlider></SwitchSlider>
316+
</Switch>
317+
)}
313318
</li>
314319
))}
315320
</ul>
@@ -461,26 +466,27 @@ const BeastMarketFilters: FC<Props> = ({
461466
{/* Filters */}
462467
<form className="hidden lg:block">
463468
<h3 className="sr-only">Categories</h3>
464-
<ul
465-
role="list"
466-
className="space-y-4 pb-6 text-sm font-medium "
467-
>
469+
<ul role="list" className="pb-6 text-sm font-medium ">
468470
{subCategories.map((category) => (
469471
<li
470472
className="flex w-full justify-between items-center"
471473
key={category.name}
472474
>
473-
<a href={category.href}>{category.name}</a>
474-
<Switch>
475-
<SwitchInput
476-
defaultChecked={favoriteToggled}
477-
type="checkbox"
478-
onChange={() => {
479-
setFavoriteToggled(!favoriteToggled)
480-
}}
481-
/>
482-
<SwitchSlider></SwitchSlider>
483-
</Switch>
475+
<a style={{ fontSize: "1.3em" }} href={category.href}>
476+
{category.name}
477+
</a>
478+
{category.name == "Favorites" && (
479+
<Switch>
480+
<SwitchInput
481+
defaultChecked={favoriteToggled}
482+
type="checkbox"
483+
onChange={() => {
484+
setFavoriteToggled(!favoriteToggled)
485+
}}
486+
/>
487+
<SwitchSlider></SwitchSlider>
488+
</Switch>
489+
)}
484490
</li>
485491
))}
486492
</ul>
@@ -496,18 +502,21 @@ const BeastMarketFilters: FC<Props> = ({
496502
<>
497503
<h3 className="-my-3 flow-root">
498504
<Disclosure.Button className="flex w-full items-center justify-between py-3 text-sm text-white hover:text-gray-500">
499-
<span className="font-medium ">
505+
<span
506+
style={{ fontSize: "1.3em" }}
507+
className="font-medium "
508+
>
500509
{section.name}
501510
</span>
502511
<span className="ml-6 flex items-center">
503512
{open ? (
504513
<MinusIcon
505-
className="h-5 w-5"
514+
className="h-4 w-4"
506515
aria-hidden="true"
507516
/>
508517
) : (
509518
<PlusIcon
510-
className="h-5 w-5"
519+
className="h-4 w-4"
511520
aria-hidden="true"
512521
/>
513522
)}

0 commit comments

Comments
 (0)