webamp/js/CharacterString.jsx
2016-07-12 09:14:58 -07:00

14 lines
344 B
JavaScript

import React from 'react';
import Character from './Character.jsx';
module.exports = (props) => {
const text = '' + props.children;
const chars = text.split('');
return <div {...props}>
{chars.map(character => {
return <Character>{character}</Character>;
})};
</div>;
};
// TODO: Require that props.children be a string