mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-30 23:18:47 +00:00
nav tabs count ensured regardless of back button
This commit is contained in:
parent
2f287113ac
commit
875f7a925c
2 changed files with 22 additions and 12 deletions
|
|
@ -22,15 +22,17 @@ const NavBar = ({ backButton, tabs, title, searchInput, userMenu }) => (
|
|||
}
|
||||
{
|
||||
tabs.length > 0 ?
|
||||
tabs.map(({ href, icon, label }) => (
|
||||
<NavBarButton
|
||||
key={href}
|
||||
className={styles['nav-bar-button']}
|
||||
href={href}
|
||||
icon={icon}
|
||||
label={label}
|
||||
/>
|
||||
))
|
||||
<div className={styles['tabs-container']}>
|
||||
{tabs.map(({ href, icon, label }) => (
|
||||
<NavBarButton
|
||||
key={href}
|
||||
className={styles['nav-bar-button']}
|
||||
href={href}
|
||||
icon={icon}
|
||||
label={label}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
:
|
||||
<h2 className={styles['title']}>{title}</h2>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
--nav-bar-height: 44px;
|
||||
font-size: 16px;
|
||||
|
||||
.nav-bar-button {
|
||||
&:nth-of-type(n+4) {
|
||||
display: none;
|
||||
.tabs-container {
|
||||
.nav-bar-button {
|
||||
&:nth-child(n+5) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -17,6 +19,12 @@
|
|||
background-color: var(--color-secondarydark);
|
||||
overflow: hidden;
|
||||
|
||||
.tabs-container {
|
||||
flex: none;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.nav-bar-button {
|
||||
max-width: calc(var(--nav-bar-height) * 3.5);
|
||||
height: var(--nav-bar-height);
|
||||
|
|
|
|||
Loading…
Reference in a new issue