15 lines
357 B
React
15 lines
357 B
React
|
import './Wobler.css'
|
||
|
import React from 'react';
|
||
|
|
||
|
export default function Wobler({ text, dance }) {
|
||
|
const spannedMessage = Array.from(text).map((letter, idx) => {
|
||
|
return <span key={idx}>{letter}</span>
|
||
|
})
|
||
|
|
||
|
return (
|
||
|
<div className={'wobler' + (dance === true ? ' dance' : '')}>
|
||
|
{spannedMessage}
|
||
|
</div>
|
||
|
)
|
||
|
}
|