mirror of
https://github.com/wassname/talk.git
synced 2026-08-06 13:41:02 +08:00
Ádd classnames based on tags
This commit is contained in:
@@ -6,11 +6,14 @@ import {addClassName, removeClassName} from 'coral-embed-stream/src/actions/comm
|
||||
|
||||
class OffTopicFilter extends React.Component {
|
||||
|
||||
className = 'OFF_TOPIC';
|
||||
tag = 'OFF_TOPIC';
|
||||
className = 'wapoOfftopic';
|
||||
|
||||
handleChange = (e) => {
|
||||
if (e.target.checked) {
|
||||
this.props.addClassName(this.className);
|
||||
this.props.addClassName({
|
||||
[this.className] : {tags: [this.tag]}
|
||||
});
|
||||
} else {
|
||||
const idx = this.props.comment.classNames.indexOf(this.className);
|
||||
this.props.removeClassName(idx);
|
||||
|
||||
Reference in New Issue
Block a user