mirror of
https://github.com/wassname/talk.git
synced 2026-06-28 22:04:50 +08:00
18 lines
416 B
JavaScript
18 lines
416 B
JavaScript
import React from 'react';
|
|
const name = 'coral-plugin-content';
|
|
|
|
const Content = ({body, styles}) => {
|
|
const textbreaks = body.split('\n');
|
|
return <div
|
|
className={`${name}-text`}
|
|
style={styles && styles.text}>
|
|
{
|
|
textbreaks.map((line, i) => <span key={i} className={`${name}-line`}>
|
|
{line} <br className={`${name}-linebreak`}/>
|
|
</span>)
|
|
}
|
|
</div>;
|
|
};
|
|
|
|
export default Content;
|