Created
August 7, 2021 21:22
-
-
Save swedesjs/935e901c4c82e9fcff866b7f59c37709 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Icon28UserCircleOutline } from "@vkontakte/icons" | |
import { Epic, Group, Panel, PanelHeader, PanelHeaderBack, Placeholder, Tabbar, TabbarItem, View } from "@vkontakte/vkui" | |
import { MouseEvent, useState } from "react" | |
type activeStory = "profile" | |
export const Navigetion = () => { | |
const [activeStory, setActiveStory] = useState<activeStory>("profile") | |
const onStoryChange = (e: MouseEvent) => { | |
setActiveStory( | |
e.currentTarget.getAttribute("data-story") as activeStory | |
) | |
} | |
return ( | |
<Epic | |
activeStory={activeStory} | |
tabbar={ | |
<Tabbar> | |
<TabbarItem | |
onClick={onStoryChange} | |
selected={activeStory === "profile"} | |
data-store="profile" | |
text="Профиль" | |
> | |
<Icon28UserCircleOutline /> | |
</TabbarItem> | |
</Tabbar> | |
} | |
> | |
<View id="profile" activePanel="profile"> | |
<Panel id="profile"> | |
<PanelHeader left={<PanelHeaderBack />}>Профиль</PanelHeader> | |
<Group style={{ height: "1000px" }}> | |
<Placeholder icon={<Icon28UserCircleOutline width={56} height={56} />}></Placeholder> | |
</Group> | |
</Panel> | |
</View> | |
</Epic> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment