mirror of
https://github.com/wassname/talk.git
synced 2026-09-09 11:38:08 +08:00
Blockquote styling
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
.content {
|
||||
blockquote {
|
||||
background-color: #F6F6F6;
|
||||
padding: 10px;
|
||||
margin: 20px 0px 20px 10px;
|
||||
font-style: italic;
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,20 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { PLUGIN_NAME } from '../constants';
|
||||
import cn from 'classnames';
|
||||
import styles from './CommentContent.css';
|
||||
|
||||
class CommentContent extends React.Component {
|
||||
render() {
|
||||
const { comment } = this.props;
|
||||
const className = cn(`${PLUGIN_NAME}-text`, styles.content);
|
||||
return comment.richTextBody ? (
|
||||
<div
|
||||
className={`${PLUGIN_NAME}-text`}
|
||||
className={className}
|
||||
dangerouslySetInnerHTML={{ __html: comment.richTextBody }}
|
||||
/>
|
||||
) : (
|
||||
<div className={`${PLUGIN_NAME}-text`}>{comment.body}</div>
|
||||
<div className={className}>{comment.body}</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
.contentEditable {
|
||||
composes: content from "./CommentContent.css";
|
||||
background: #fff;
|
||||
border: solid 1px #bbb;
|
||||
min-height: 120px;
|
||||
|
||||
Reference in New Issue
Block a user