Added noActions prop to NavigationBar
• Added: - noActions prop to NavigationBar for Introduction
This commit is contained in:
parent
e9475219c9
commit
37499c3172
@ -47,6 +47,7 @@ class NavigationBar extends ImmutablePureComponent {
|
|||||||
showBackBtn: PropTypes.bool,
|
showBackBtn: PropTypes.bool,
|
||||||
onOpenSidebar: PropTypes.func.isRequired,
|
onOpenSidebar: PropTypes.func.isRequired,
|
||||||
onOpenNavSettingsPopover: PropTypes.func.isRequired,
|
onOpenNavSettingsPopover: PropTypes.func.isRequired,
|
||||||
|
noActions: PropTypes.bool,
|
||||||
noSearch: PropTypes.bool,
|
noSearch: PropTypes.bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,6 +67,7 @@ class NavigationBar extends ImmutablePureComponent {
|
|||||||
tabs,
|
tabs,
|
||||||
account,
|
account,
|
||||||
onOpenSidebar,
|
onOpenSidebar,
|
||||||
|
noActions,
|
||||||
noSearch,
|
noSearch,
|
||||||
} = this.props
|
} = this.props
|
||||||
|
|
||||||
@ -104,6 +106,8 @@ class NavigationBar extends ImmutablePureComponent {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={[_s.default, _s.mlAuto].join(' ')}>
|
<div className={[_s.default, _s.mlAuto].join(' ')}>
|
||||||
|
{
|
||||||
|
!noActions &&
|
||||||
<div className={[_s.default, _s.height53PX, _s.pl15, _s.flexRow, _s.alignItemsCenter, _s.justifyContentSpaceBetween].join(' ')}>
|
<div className={[_s.default, _s.height53PX, _s.pl15, _s.flexRow, _s.alignItemsCenter, _s.justifyContentSpaceBetween].join(' ')}>
|
||||||
|
|
||||||
<NavigationBarButton title='Home' icon='home' to='/home' />
|
<NavigationBarButton title='Home' icon='home' to='/home' />
|
||||||
@ -128,6 +132,7 @@ class NavigationBar extends ImmutablePureComponent {
|
|||||||
</button>
|
</button>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</Responsive>
|
</Responsive>
|
||||||
@ -136,7 +141,7 @@ class NavigationBar extends ImmutablePureComponent {
|
|||||||
<Responsive max={BREAKPOINT_EXTRA_SMALL}>
|
<Responsive max={BREAKPOINT_EXTRA_SMALL}>
|
||||||
<div className={[_s.default, _s.width84PX, _s.alignItemsStart, _s.pl10].join(' ')}>
|
<div className={[_s.default, _s.width84PX, _s.alignItemsStart, _s.pl10].join(' ')}>
|
||||||
{
|
{
|
||||||
!!account && !showBackBtn &&
|
!!account && !showBackBtn && !noActions &&
|
||||||
<button
|
<button
|
||||||
title={account.get('display_name')}
|
title={account.get('display_name')}
|
||||||
onClick={onOpenSidebar}
|
onClick={onOpenSidebar}
|
||||||
@ -154,6 +159,22 @@ class NavigationBar extends ImmutablePureComponent {
|
|||||||
iconClassName={[_s.mr5, _s.fillNavigation].join(' ')}
|
iconClassName={[_s.mr5, _s.fillNavigation].join(' ')}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
noActions &&
|
||||||
|
<h1 className={[_s.default, _s.mr15].join(' ')}>
|
||||||
|
<Button
|
||||||
|
to='/'
|
||||||
|
isText
|
||||||
|
title='Gab'
|
||||||
|
aria-label='Gab'
|
||||||
|
color='none'
|
||||||
|
backgroundColor='none'
|
||||||
|
className={[_s.default, _s.justifyContentCenter, _s.noSelect, _s.noUnderline, _s.height53PX, _s.cursorPointer, _s.px10, _s.mr15].join(' ')}
|
||||||
|
>
|
||||||
|
<Icon id='logo' className={_s.fillNavigationBrand} />
|
||||||
|
</Button>
|
||||||
|
</h1>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={[_s.default, _s.height53PX, _s.justifyContentCenter, _s.mlAuto, _s.mrAuto].join(' ')}>
|
<div className={[_s.default, _s.height53PX, _s.justifyContentCenter, _s.mlAuto, _s.mrAuto].join(' ')}>
|
||||||
@ -181,6 +202,8 @@ class NavigationBar extends ImmutablePureComponent {
|
|||||||
/>
|
/>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
!noSearch &&
|
||||||
<Button
|
<Button
|
||||||
isNarrow
|
isNarrow
|
||||||
backgroundColor='none'
|
backgroundColor='none'
|
||||||
@ -192,6 +215,7 @@ class NavigationBar extends ImmutablePureComponent {
|
|||||||
iconClassName={_s.fillNavigation}
|
iconClassName={_s.fillNavigation}
|
||||||
iconSize='18px'
|
iconSize='18px'
|
||||||
/>
|
/>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user