Add gap between tabs

This commit is contained in:
0x1eef 2024-04-26 01:43:31 -03:00
parent 49d9b38bd4
commit e0c44c96e9

View file

@ -23,14 +23,14 @@ export function Tabs({ defaultLabel, labels, onChange }: Props) {
return (
<ul className="flex w-full">
{...tabs.map(tab => {
{...tabs.map((tab, i) => {
const isActive = active?.id === tab.id;
const classNames = {
"active-item": isActive,
"inactive-item": !isActive,
};
return (
<li className={classnames(classNames)}>
<li className={classnames(classNames, i > 0 ? "ml-3" : "")}>
<a
href={location.hash}
onClick={e => [e.preventDefault(), setActive(tab)]}