almond-bongbong / react-slot-counter

🚀 Elevate Your UI with Dynamic, Eye-Catching Counters
https://almond-bongbong.github.io/react-slot-counter/
112 stars 12 forks source link

SlotCounter don't align to center with dummyCharactorCount props #30

Closed Philip-general closed 6 months ago

Philip-general commented 11 months ago

I used SlotCounter with dummyCharactorCount but the spans are not aligned to center.

how can I handle this?

these are my code below. both code are not working at me.

  1. <SlotCounter value="9999" dummyCharacterCount={20} />
  2. const counterRef = useRef<SlotCounterRef>(null);
    useEffect(() => {
    counterRef.current?.refreshStyles();
    counterRef.current?.startAnimation({
      dummyCharacterCount: 20,
    });
    }, []);
    ...
    return <SlotCounter ref={counterRef} value="9999" />

https://github.com/almond-bongbong/react-slot-counter/assets/78997057/ab73ed98-ee67-4e82-9614-ff583464bb60

almond-bongbong commented 11 months ago

Thank you very much for creating the issue. Is there a live page that I can review to better understand the problem?

almond-bongbong commented 11 months ago

In the recent 2.2.1 version, I made adjustments to the alignment. Please give it a try and see if it resolves the issue.