corda-checkers/webapp/src/components/Wobler.jsx

15 lines
357 B
JavaScript

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>
)
}