mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-23 10:07:35 +00:00
16 lines
372 B
TypeScript
16 lines
372 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 chars.map((character, index) => (
|
|
<Character key={index + character}>{character}</Character>
|
|
));
|
|
};
|
|
|
|
export default CharacterString;
|