Add gap between tabs
This commit is contained in:
parent
49d9b38bd4
commit
e0c44c96e9
1 changed files with 2 additions and 2 deletions
|
@ -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)]}
|
||||
|
|
Loading…
Reference in a new issue