Files
real-skill-landing/src/components/Marquee.astro
Salam-vsem 24899dc686 - one more time rework slider
- rework design system
- fill trainer page
2025-05-16 15:08:36 +03:00

24 lines
561 B
Plaintext

---
import { Image } from 'astro:assets'
import wideCrossIconSrc from '@/assets/icons/WideCrossIcon.svg'
type Props = {
texts: string[]
}
const { texts } = Astro.props
const repeatedTexts =
texts.length < 10 ? Array.from({ length: 10 / texts.length }, () => texts).flat() : texts
---
<div class="flex h-full w-max animate-marquee items-center gap-10 text-5xl font-bold uppercase">
{
repeatedTexts.map((text) => (
<>
<h2>{text}</h2>
<Image src={wideCrossIconSrc} alt="cross-icon" loading="eager" />
</>
))
}
</div>