Skip to content

Instantly share code, notes, and snippets.

@drewsmith
Created August 31, 2018 16:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drewsmith/6ed5db1621462aad96c01e967541bffa to your computer and use it in GitHub Desktop.
Save drewsmith/6ed5db1621462aad96c01e967541bffa to your computer and use it in GitHub Desktop.
const menuItems = [
{ display: "Home", icon: 'home' },
{ display: "Congregations", icon: 'users' },
{ display: "Members", icon: 'users' },
{ display: "Profile", icon: 'write' },
{ display: "Logout", icon: 'power' }
];
const MenuItems = ({items = [], itemStyle = {}}) => (
<React.Fragment>
{items.map(({ display, icon }) => (
<Menu.Item
as='a'
key={display}
name={display}
style={itemStyle}
>
<Icon name={icon} inverted style={{ color: '#709acd' }} />
{display}
</Menu.Item>
))}
</React.Fragment>
)
<NavBarMobile
onPusherClick={this.handlePusher}
onToggle={this.handleToggle}
rightItems={menuItems}
visible={visible}
>
{children}
</NavBarMobile>
<Sidebar
as={Menu}
animation="overlay"
icon="labeled"
inverted
vertical
visible={visible}
style={{ backgroundColor: '#2e567b' }}
>
<MenuItems items={rightItems} itemStyle={responsiveStyle} />
</Sidebar>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment