mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
add maps and playlist slide
This commit is contained in:
+13
-2
@@ -1,3 +1,5 @@
|
||||
import { useState } from "react"
|
||||
import { MapsManagerService } from "renderer/services/maps-manager.service"
|
||||
import { BSVersion } from "shared/bs-version.interface"
|
||||
import { TabNavBar } from "../shared/tab-nav-bar.component"
|
||||
|
||||
@@ -6,9 +8,18 @@ type Props = {
|
||||
}
|
||||
|
||||
export function MapsPlaylistsPanel({version}: Props) {
|
||||
|
||||
const [tabIndex, setTabIndex] = useState(0);
|
||||
|
||||
console.log(tabIndex);
|
||||
|
||||
return (
|
||||
<div className="w-full h-full bg-main-color-1 rounded-md shadow-black shadow-md overflow-hidden">
|
||||
<TabNavBar className="!rounded-none shadow-none" tabsText={["Maps", "Playlists"]} onTabChange={() => {}}/>
|
||||
</div>
|
||||
<TabNavBar className="!rounded-none shadow-sm" tabsText={["Maps", "Playlists"]} onTabChange={setTabIndex}/>
|
||||
<div className="w-full h-full flex flex-row items-center transition-transform duration-300" style={{transform: `translate(${-(tabIndex * 100)}%, 0)`}}>
|
||||
<div className="w-full h-full grow bg-red-300 shrink-0">a</div>
|
||||
<div className="w-full h-full bg-green-300 shrink-0">b</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user