@szum-tech/design-system
Version:
Szum-Tech design system with tailwindcss support
1 lines • 812 B
JavaScript
import {a as a$1}from'./chunk-JUNHRB4B.js';import*as a from'react';import {jsx,Fragment}from'react/jsx-runtime';function x({className:n,reverse:t=false,pauseOnHover:i=false,children:l,vertical:e=false,repeat:s=4,ariaLabel:f,ariaLive:p="off",ariaRole:m="region",...u}){let d=a.useRef(null);return jsx("div",{...u,ref:d,"data-slot":"marquee",className:a$1("group flex gap-(--gap) overflow-hidden p-2 [--duration:40s] [--gap:1rem]",{"flex-row":!e,"flex-col":e},n),"aria-label":f,"aria-live":p,role:m,tabIndex:0,children:a.useMemo(()=>jsx(Fragment,{children:Array.from({length:s},(v,c)=>jsx("div",{className:a$1("flex shrink-0 justify-around gap-(--gap)",e?"animate-marquee-vertical flex-col":"animate-marquee flex-row",i&&"group-hover:paused",t&&"direction-reverse"),children:l},c))}),[s,l,e,i,t])})}export{x as a};