This commit is contained in:
Jesse Winton
2025-04-10 16:27:39 -04:00
parent 9528d9e708
commit ad1eae75df
4 changed files with 48 additions and 44 deletions

View File

@@ -1,15 +1,18 @@
<script lang="ts">
import { classNames } from '$lib/utils/classnames';
export let text: string;
const words = text.split(' ');
interface Props {
text: string;
class?: string;
}
let className: string = '';
export { className as class };
let { text, class: className = '' }: Props = $props();
const words = text.split(' ');
</script>
<span class="sr-only">{text}</span>
<span class={classNames('relative', className)}>
<span class={classNames('relative overflow-hidden', className)}>
{#each words as word, i}
<span
class="animate-text mr-2 inline-block"