mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-08-15 10:36:35 +00:00
nav title rendered in the nav bar and styled
This commit is contained in:
parent
a8cdf73258
commit
7a0fb1ad2b
2 changed files with 8 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ class NavBar extends Component {
|
|||
return (
|
||||
<nav className={styles['nav-bar']}>
|
||||
{this.props.tabs.map(tab => <NavTab key={tab.to} {...tab} />)}
|
||||
{this.props.title.length > 0 ? <h2 className={styles['nav-title']}>{this.props.title}</h2> : null}
|
||||
{this.props.searchInput ? <SearchInput /> : null}
|
||||
</nav>
|
||||
);
|
||||
|
|
@ -31,11 +32,13 @@ NavBar.propTypes = {
|
|||
exact: PropTypes.bool,
|
||||
replace: PropTypes.bool
|
||||
})).isRequired,
|
||||
title: PropTypes.string.isRequired,
|
||||
searchInput: PropTypes.bool.isRequired
|
||||
};
|
||||
|
||||
NavBar.defaultProps = {
|
||||
tabs: [],
|
||||
title: '',
|
||||
searchInput: false
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -5,4 +5,9 @@
|
|||
flex-direction: row;
|
||||
align-items: center;
|
||||
background-color: @colorsecondary;
|
||||
}
|
||||
.nav-title {
|
||||
color: @colorwhite;
|
||||
font-size: 16px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
Loading…
Reference in a new issue