Files
xevion.dev/src/components/SteppedSpan.tsx
2022-12-21 14:57:11 -06:00

18 lines
397 B
TypeScript

import {FunctionComponent} from "react";
type SteppedSpanProps = {
children: string;
}
const SteppedSpan: FunctionComponent<SteppedSpanProps> = ({children}: SteppedSpanProps) => {
return <div className="stepped">
{children.split('').map((char: string, index) => {
return <span key={index}>
{char}
</span>
})}
</div>
}
export default SteppedSpan;