feat: Add spatial navigation scrollTo strategies

This commit is contained in:
Aleksi Lassila
2024-03-29 18:41:43 +02:00
parent 2656cdbc68
commit cb1f2de506
6 changed files with 146 additions and 76 deletions

View File

@@ -3,6 +3,7 @@
import { ChevronLeft, ChevronRight } from 'radix-icons-svelte';
import classNames from 'classnames';
import Container from '../../../Container.svelte';
import { scrollWithOffset } from '../../selectable';
export let gradientFromColor = 'from-stone-950';
export let heading = '';
@@ -44,7 +45,7 @@
</div>
<div class="relative">
<Container direction="horizontal">
<Container childrenRevealStrategy={scrollWithOffset('left', 50)} direction="horizontal">
<div
class={classNames(
'flex overflow-x-scroll items-center overflow-y-visible relative scrollbar-hide',