Skip to content

The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.

693 B
Raw Blame
import { TabsTrigger } from '@/components/atoms/TabsTrigger/TabsTrigger';
import LocalizedClientLink from "@/components/molecules/LocalizedLink/LocalizedLink"

export const TabsList = ({
  list,
  activeTab,
  "data-testid": dataTestId,
}: {
  list: { label: string; link: string }[]
  activeTab: string
  "data-testid"?: string
}) => {
  return (
    <div className="flex gap-4 w-full" data-testid={dataTestId ?? 'tabs-list'}>
      {list.map(({ label, link }) => (
        <LocalizedClientLink key={label} href={link}>
          <TabsTrigger isActive={activeTab === label.toLowerCase()}>
            {label}
          </TabsTrigger>
        </LocalizedClientLink>
      ))}
    </div>
  )
}