mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-20 23:12:13 +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 React = require('react');
|
||||||
|
const classnames = require('classnames');
|
||||||
const PropTypes = require('prop-types');
|
const PropTypes = require('prop-types');
|
||||||
const NavBarButton = require('./NavBarButton');
|
const NavBarButton = require('./NavBarButton');
|
||||||
const SearchBar = require('./SearchBar');
|
const SearchBar = require('./SearchBar');
|
||||||
const UserMenu = require('./UserMenu');
|
const UserMenu = require('./UserMenu');
|
||||||
const styles = require('./styles');
|
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(() => {
|
const onBackButtonClick = React.useCallback(() => {
|
||||||
window.history.back();
|
window.history.back();
|
||||||
}, []);
|
}, []);
|
||||||
return (
|
return (
|
||||||
<nav className={styles['nav-bar']}>
|
<nav className={classnames(className, styles['nav-bar'])}>
|
||||||
{
|
{
|
||||||
backButton ?
|
backButton ?
|
||||||
<NavBarButton
|
<NavBarButton
|
||||||
|
|
@ -61,6 +62,7 @@ const NavBar = React.memo(({ backButton, tabs, title, searchBar, userMenu }) =>
|
||||||
NavBar.displayName = 'NavBar';
|
NavBar.displayName = 'NavBar';
|
||||||
|
|
||||||
NavBar.propTypes = {
|
NavBar.propTypes = {
|
||||||
|
className: PropTypes.string,
|
||||||
backButton: PropTypes.bool,
|
backButton: PropTypes.bool,
|
||||||
tabs: PropTypes.arrayOf(PropTypes.exact({
|
tabs: PropTypes.arrayOf(PropTypes.exact({
|
||||||
icon: PropTypes.string.isRequired,
|
icon: PropTypes.string.isRequired,
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,6 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
|
||||||
height: var(--nav-bar-height);
|
height: var(--nav-bar-height);
|
||||||
background-color: var(--color-secondarydark);
|
background-color: var(--color-secondarydark);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue