const DATA = [
{
name: 'J Bloggs',
testimonial: 'Amazing work, highly recommend!'
}
...,
...,
]
const Testimonial = ({ name, testimonial }) => {
const randomGender = Math.round(Math.random()) ? Men : Women
const randomNumber = Math.floor((Math.random() * 4))
return (
<>
<span className='FloatingHead_avatar'>{randomGender[randomNumber]()}</span> // this selects a random avatar
<div className='FloatingHead_textWrap'>
<div className='FloatingHead_textBackground'>
<span className='FloatingHead_name'>{name}</span>
<span className='FloatingHead_testimonial'>{testimonial}</span>
</div>
</div>
</>
)
}
const AdvancedExample = () => (
<River
allItems={DATA}
reactKey='name'
Component={Testimonial}
className='FloatingHead'
amountOfRows={3}
yDistanceBetweenRows={150}
yVariation={20}
yDuration={3}
xDistanceBetweenItems={200}
xDuration={20}
/>
)