mirror of
https://github.com/captbaritone/webamp.git
synced 2026-01-23 18:25:30 +00:00
20 lines
437 B
TypeScript
20 lines
437 B
TypeScript
import React from "react";
|
|
import Character from "./Character";
|
|
|
|
interface Props {
|
|
children: string;
|
|
}
|
|
|
|
const CharacterString = (props: Props) => {
|
|
const text = `${props.children}` || "";
|
|
const chars = text.split("");
|
|
return (
|
|
<React.Fragment>
|
|
{chars.map((character, index) => (
|
|
<Character key={index + character}>{character}</Character>
|
|
))}
|
|
</React.Fragment>
|
|
);
|
|
};
|
|
|
|
export default CharacterString;
|