You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I combined scrolling tabs with scrollspy. Everything works fine and when I scroll down, tabs will be selected automatically. But the problem is when the selected tab goes beyond the navbar.
`import styled, { css } from "styled-components";
import { AppBar } from "@material-ui/core";
import ScrollspyNav from "react-scrollspy-nav";
Hello there.
I combined scrolling tabs with scrollspy. Everything works fine and when I scroll down, tabs will be selected automatically. But the problem is when the selected tab goes beyond the navbar.
`import styled, { css } from "styled-components";
import { AppBar } from "@material-ui/core";
import ScrollspyNav from "react-scrollspy-nav";
const Scrollpsy = () => (
<ScrollspyNav
scrollTargetIds={[
"itinerary",
"review",
"whatsIncluded",
"departureDate"
]}
offset={170}
activeNavClass="is-active"
scrollDuration="1000"
headerBackground="true"
>
View departure dates
Itinerary
What’s included
Reviews
);
export default Scrollpsy;
const ScrollpsyAppBar = styled(AppBar)
${({ theme }) => css
&.MuiAppBar-colorSecondary {
align-items: center;
padding: ${theme.spacing(0, 4)};
box-shadow: none;
z-index: 9999;
}
}
;const Container = styled.div
${({ theme }) => css
width: 100%;
max-width: ${theme.gridWidths[12]};
}
;`
Please give suggestion.
Thanks & Regards
The text was updated successfully, but these errors were encountered: