FilecoinFoundationWeb / filecoin-foundation

Filecoin Foundation Site
https://fil.org
1 stars 3 forks source link

[UXIT-1713] Refactor ListboxButton and reuse instead of native headless ui component #794

Closed barbaraperic closed 2 days ago

barbaraperic commented 1 week ago

๐Ÿ“ Description

This PR refactors the ListboxButton component and replaces the Headless UI ListboxButton with our custom implementation.

      <div className={`${isCompact ? 'flex' : 'hidden'}`}>
        <Icon component={prefixIcon ?? CaretDown} />
      </div>

๐Ÿ› ๏ธ Key Changes

๐Ÿงช How to Test

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git โ†—๏ธŽ

Name Status Preview Comments Updated (UTC)
filecoin-foundation-site โœ… Ready (Inspect) Visit Preview ๐Ÿ’ฌ Add feedback Nov 11, 2024 10:15am
notion-workspace[bot] commented 1 week ago

[FF] Refactor Listbox

notion-workspace[bot] commented 1 week ago

[FF] Refactor ListboxButton

barbaraperic commented 6 days ago

I've suggested some rework @barbaraperic, we can discuss and/or implement these live if you want :)

Also, regarding your question in the PR description, could we add the md:w-40 in the layout component as below?

FilterContainer.MobileFiltersAndResults = function MobileFiltersAndResults({
  search,
  category,
  sort,
  results,
}: FilterProps) {
  return (
    <div className="flex flex-col gap-4 lg:hidden">
      <div className="flex flex-col gap-3 sm:flex-row">
        {search}
        <div className="flex flex-1 gap-3 sm:flex-row">
          <div className="w-full md:w-40">{category}</div>
          <div className="max-fit md:w-40">{sort}</div>
        </div>
      </div>
      {results}
    </div>
  )
}

Ah great yes, thank you. I tried that, but some reason I thought it didn't work.