chore(sites): Improved tabbed example mdx component
This commit is contained in:
parent
d9741254a9
commit
2d37cc6ee5
1 changed files with 19 additions and 22 deletions
|
@ -32,12 +32,9 @@ export const Tabs = ({ tabs = '', active = 0, children, withModal = false }) =>
|
||||||
}`
|
}`
|
||||||
|
|
||||||
return withModal && activeTab === tabId ? (
|
return withModal && activeTab === tabId ? (
|
||||||
<div className={`flex flex-row justify-between w-1/${tablist.length}`}>
|
|
||||||
<button key={tabId} className={btnClasses} onClick={() => setActiveTab(tabId)}>
|
|
||||||
{title}
|
|
||||||
</button>
|
|
||||||
<button
|
<button
|
||||||
className={`${btnClasses} px-0`}
|
key={tabId}
|
||||||
|
className={btnClasses}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
setModal(
|
setModal(
|
||||||
<ModalWrapper
|
<ModalWrapper
|
||||||
|
@ -51,9 +48,9 @@ export const Tabs = ({ tabs = '', active = 0, children, withModal = false }) =>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
|
<span className="pr-2">{title}</span>
|
||||||
<KioskIcon className="w-6 h-6 hover:text-secondary" />
|
<KioskIcon className="w-6 h-6 hover:text-secondary" />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
|
||||||
) : (
|
) : (
|
||||||
<button key={tabId} className={btnClasses} onClick={() => setActiveTab(tabId)}>
|
<button key={tabId} className={btnClasses} onClick={() => setActiveTab(tabId)}>
|
||||||
{title}
|
{title}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue