mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-23 12:07:46 +00:00
NavBar size used from className prop
This commit is contained in:
parent
1dc3e77007
commit
5645fb4d2e
2 changed files with 4 additions and 3 deletions
|
|
@ -1,16 +1,17 @@
|
|||
const React = require('react');
|
||||
const classnames = require('classnames');
|
||||
const PropTypes = require('prop-types');
|
||||
const NavBarButton = require('./NavBarButton');
|
||||
const SearchBar = require('./SearchBar');
|
||||
const UserMenu = require('./UserMenu');
|
||||
const styles = require('./styles');
|
||||
|
||||
const NavBar = React.memo(({ backButton, tabs, title, searchBar, userMenu }) => {
|
||||
const NavBar = React.memo(({ className, backButton, tabs, title, searchBar, userMenu }) => {
|
||||
const onBackButtonClick = React.useCallback(() => {
|
||||
window.history.back();
|
||||
}, []);
|
||||
return (
|
||||
<nav className={styles['nav-bar']}>
|
||||
<nav className={classnames(className, styles['nav-bar'])}>
|
||||
{
|
||||
backButton ?
|
||||
<NavBarButton
|
||||
|
|
@ -61,6 +62,7 @@ const NavBar = React.memo(({ backButton, tabs, title, searchBar, userMenu }) =>
|
|||
NavBar.displayName = 'NavBar';
|
||||
|
||||
NavBar.propTypes = {
|
||||
className: PropTypes.string,
|
||||
backButton: PropTypes.bool,
|
||||
tabs: PropTypes.arrayOf(PropTypes.exact({
|
||||
icon: PropTypes.string.isRequired,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@
|
|||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
height: var(--nav-bar-height);
|
||||
background-color: var(--color-secondarydark);
|
||||
overflow: hidden;
|
||||
|
|
|
|||
Loading…
Reference in a new issue