Skip to content

Instantly share code, notes, and snippets.

@batFormat
Last active September 17, 2020 11:35
Show Gist options
  • Save batFormat/cc2feee69124e5791da443dfa944ba68 to your computer and use it in GitHub Desktop.
Save batFormat/cc2feee69124e5791da443dfa944ba68 to your computer and use it in GitHub Desktop.
<Epic
activeStory={location.getViewId()}
tabbar={
<Tabbar>
{tabbarItems.map(({ title, page, icon, panels }) => (
<TabbarItem
key={page}
onClick={() => router.pushPage(page)}
selected={panels.includes(location.getPanelId())}
text={title}
>
{icon}
</TabbarItem>
))}
</Tabbar>
}
>
<View
id={ViewsEnum.Main}
header={false}
activePanel={location.getViewActivePanel(ViewsEnum.Main)}
>
<MainPanel id={PanelsEnum.Main} />
<CategoryPanel id={PanelsEnum.MainCategory} />
</View>
<View
id={ViewsEnum.Secondary}
header={false}
activePanel={location.getViewActivePanel(ViewsEnum.Secondary)}
>
<SecondaryPanel id={PanelsEnum.Secondary} />
<CategoryPanel id={PanelsEnum.SecondaryCategory} />
</View>
</Epic>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment