Skip to content

Commit

Permalink
Made filter popover less wide
Browse files Browse the repository at this point in the history
  • Loading branch information
mbeps committed Apr 29, 2024
1 parent 1c252b6 commit 14b2b2a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
27 changes: 14 additions & 13 deletions components/Filters/FilterPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const FilterOverlay: React.FC<FilterOverlayProps> = ({
top-0 right-0
h-full
pt-${NAVBAR_HEIGHT} md:px-2 md:pb-3
w-full md:w-[25rem]
w-full md:w-[24rem]
z-20
transform ${
isOpen ? "translate-x-0" : "translate-x-full"
Expand Down Expand Up @@ -167,25 +167,26 @@ const FilterOverlay: React.FC<FilterOverlayProps> = ({
"
>
{/* Clear Button */}
<Link href={basePath} className="w-full" scroll={false}>
<Button
variant="default"
disabled={!areFiltersApplied}
className="
w-full
flex justify-start
bg-neutral-100
border border-neutral-300 dark:border-neutral-700"
>
<Button
variant="default"
disabled={!areFiltersApplied}
className="
w-auto
px-6
flex justify-start
bg-neutral-100
border border-neutral-300 dark:border-neutral-700"
>
<Link href={basePath} className="w-full" scroll={false}>
<div className="flex items-center space-x-2">
<AiOutlineClear
fontSize={24}
className="text-neutral-700 dark:text-neutral-200"
/>
<span>Clear All</span>
</div>
</Button>
</Link>
</Link>
</Button>

{/* Archive Toggle */}
{archiveFilter.hasArchivedMaterials && (
Expand Down
8 changes: 4 additions & 4 deletions components/Filters/FilterPopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const FilterPopover: React.FC<FilterPopover> = ({
className="
border border-neutral-300 dark:border-neutral-700
shadow-sm
w-[24rem] md:w-[22rem]
w-full
justify-between
bg-neutral-100
py-2 h-full"
Expand All @@ -103,12 +103,12 @@ const FilterPopover: React.FC<FilterPopover> = ({
</Button>
</PopoverTrigger>

<PopoverContent className="w-[24rem] md:w-[22rem] p-0">
<Command className="w-[24rem] md:w-[22rem]">
<PopoverContent className="w-[24rem] md:w-[21rem] p-0">
<Command className="w-full">
<CommandInput placeholder="Search Filter..." />
<CommandEmpty>No Filter Found.</CommandEmpty>

<CommandGroup className="w-[24rem] md:w-[22rem] max-h-[25vh]">
<CommandGroup className="w-full max-h-[25vh]">
{selectedFilterCategory.options.map((option, i) => (
<Link
key={i}
Expand Down

0 comments on commit 14b2b2a

Please sign in to comment.