fix: Custom scrollIntoView function with offsets and onFocus handlers for containers

This commit is contained in:
Aleksi Lassila
2024-04-05 12:51:11 +03:00
parent 754227737b
commit b436e809de
12 changed files with 275 additions and 162 deletions

View File

@@ -1,7 +1,6 @@
<script lang="ts">
import Container from '../../Container.svelte';
import { onMount } from 'svelte';
import { scrollWithOffset } from '../selectable';
let cols: number = 1;
const calculateRows = () => {
@@ -25,7 +24,6 @@
<Container
direction="grid"
gridCols={cols}
childrenRevealStrategy={scrollWithOffset('all', 50)}
class="grid gap-x-4 gap-y-8 grid-cols-2 md:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5"
>
<slot />