2023-01-19 04:41:44 -08:00
|
|
|
import React from "react";
|
2022-04-04 05:02:31 -07:00
|
|
|
|
2023-01-19 04:41:44 -08:00
|
|
|
import { Tab } from "@headlessui/react";
|
2022-04-04 05:02:31 -07:00
|
|
|
|
|
|
|
export interface CardTabProps {
|
2023-05-11 18:45:34 -07:00
|
|
|
title: string;
|
2022-04-04 05:02:31 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
export const CardTab = ({ title }: CardTabProps): JSX.Element => {
|
2023-05-11 18:45:34 -07:00
|
|
|
return (
|
|
|
|
<Tab
|
|
|
|
className={({ selected }) =>
|
|
|
|
`w-1/3 truncate rounded-md px-3 py-2 text-sm font-medium hover:bg-tertiary ${
|
|
|
|
selected ? "bg-secondary shadow-md" : ""
|
|
|
|
}`
|
|
|
|
}
|
|
|
|
>
|
|
|
|
{title}
|
|
|
|
</Tab>
|
|
|
|
);
|
2022-04-04 05:02:31 -07:00
|
|
|
};
|