mirror of
https://github.com/System-End/site.git
synced 2026-04-19 16:28:21 +00:00
Add scroll-snapping to projects gallery
This commit is contained in:
parent
dce2a75568
commit
97c212f639
2 changed files with 4 additions and 2 deletions
|
|
@ -16,7 +16,8 @@ export default function Project({ title, description, color, img, itemId }) {
|
|||
transformOrigin: 'center',
|
||||
mr: 16,
|
||||
// this is v janky please ignore, thank you.
|
||||
ml: ['1rem', '1rem', '1rem', `${itemId === 0 && 'calc(50vw - 36.5rem)'}`]
|
||||
ml: ['1rem', '1rem', '1rem', `${itemId === 0 && 'calc(50vw - 36.5rem)'}`],
|
||||
scrollSnapAlign: 'center'
|
||||
}}
|
||||
itemId={itemId}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ const SlackPage = () => {
|
|||
{`
|
||||
.react-horizontal-scrolling-menu--scroll-container {
|
||||
scrollbar-width: none;
|
||||
scroll-snap-type: x mandatory;
|
||||
}
|
||||
|
||||
.react-horizontal-scrolling-menu--scroll-container::-webkit-scrollbar {
|
||||
|
|
@ -97,7 +98,7 @@ const SlackPage = () => {
|
|||
}}
|
||||
>
|
||||
<Box onMouseEnter={disableScroll} onMouseLeave={enableScroll}>
|
||||
<ScrollMenu Footer={Arrows} transitionDuration={900}>
|
||||
<ScrollMenu Footer={Arrows} transitionBehavior="smooth" noPolyfill>
|
||||
{projects.map((project, i) => (
|
||||
<Project
|
||||
title={project.title}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue