can now link and unlink version maps

This commit is contained in:
MathieuG-P
2022-11-26 23:29:50 +01:00
parent 31f38820d2
commit d390050183
11 changed files with 171 additions and 51 deletions
@@ -6,7 +6,7 @@ type Props = {
tabsText: string[],
onTabChange: (index: number) => void,
className?: string,
renderTab?: (props: DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, text: string) => JSX.Element
renderTab?: (props: DetailedHTMLProps<React.HTMLAttributes<any>, any>, text: string, index?: number) => JSX.Element
}
export function TabNavBar(props: Props) {
@@ -30,7 +30,7 @@ export function TabNavBar(props: Props) {
{props.tabsText.map((text, index) => (
props.renderTab ? (
<Fragment key={text}>
{props.renderTab({onClick: () => selectTab(index)}, t(text))}
{props.renderTab({onClick: () => selectTab(index)}, t(text), index)}
</Fragment>
) : (
<li className="px-4 h-full text-center text-gray-800 dark:text-gray-200 text-lg font-bold hover:backdrop-brightness-75" key={text} onClick={() => selectTab(index)}>{t(text)}</li>