replacing coral-ui in plugins

This commit is contained in:
Belen Curcio
2017-06-14 13:22:03 -03:00
parent 787ba75ede
commit 25376bd00f
10 changed files with 30 additions and 8 deletions
@@ -0,0 +1,19 @@
import React from 'react';
const CommentContent = ({comment}) => {
const textbreaks = comment.body.split('\n');
return <div className={`${name}-text`}>
{
textbreaks.map((line, i) => {
return (
<span key={i} className={`${name}-line`}>
{line}
<br className={`${name}-linebreak`}/>
</span>
);
})
}
</div>;
};
export default CommentContent;
+2
View File
@@ -3,6 +3,7 @@ import {Icon} from '../coral-ui';
import styles from './Comment.css';
import Slot from 'coral-framework/components/Slot';
import PubDate from '../coral-plugin-pubdate/PubDate';
import CommentContent from '../coral-embed-stream/src/components/CommentContent';
import t from 'coral-framework/services/i18n';
@@ -12,6 +13,7 @@ const Comment = (props) => {
<div>
<Slot
fill="commentContent"
defaultComponent={CommentContent}
className={`${styles.commentBody} myCommentBody`}
comment={props.comment}
/>