refactor: use classic for conditional classes

This commit is contained in:
2023-06-11 20:23:18 +02:00
parent 4dce8354f7
commit 1360b095be
12 changed files with 43 additions and 16 deletions

View File

@@ -8,6 +8,7 @@
</style>
<script lang="ts">
import cx from 'classix'
import { map } from 'utils/math'
import reveal from '$animations/reveal'
@@ -39,11 +40,11 @@
parallax = isLarger ? map(scrollY, offsetStart, offsetEnd, 0, -toTranslate, true) : 0
}
const classes = [
$: classes = cx(
'scrolling-title',
'title-huge',
$$props.class
].join(' ').trim()
)
const revealOptions = animate ? {
children: '.char',