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 (
|
return (
|
||||||
<ul className="flex w-full">
|
<ul className="flex w-full">
|
||||||
{...tabs.map(tab => {
|
{...tabs.map((tab, i) => {
|
||||||
const isActive = active?.id === tab.id;
|
const isActive = active?.id === tab.id;
|
||||||
const classNames = {
|
const classNames = {
|
||||||
"active-item": isActive,
|
"active-item": isActive,
|
||||||
"inactive-item": !isActive,
|
"inactive-item": !isActive,
|
||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<li className={classnames(classNames)}>
|
<li className={classnames(classNames, i > 0 ? "ml-3" : "")}>
|
||||||
<a
|
<a
|
||||||
href={location.hash}
|
href={location.hash}
|
||||||
onClick={e => [e.preventDefault(), setActive(tab)]}
|
onClick={e => [e.preventDefault(), setActive(tab)]}
|
||||||
|
|
Loading…
Reference in a new issue