mirror of
https://github.com/flarum/framework.git
synced 2025-06-17 15:32:20 +08:00
Dasherize post/notification type class names
This commit is contained in:
@ -2,13 +2,14 @@ import Post from 'flarum/components/post';
|
||||
import username from 'flarum/helpers/username';
|
||||
import icon from 'flarum/helpers/icon';
|
||||
import humanTime from 'flarum/utils/human-time';
|
||||
import { dasherize } from 'flarum/utils/string';
|
||||
|
||||
export default class PostActivity extends Post {
|
||||
view(iconName, content, attrs) {
|
||||
var post = this.props.post;
|
||||
|
||||
attrs = attrs || {};
|
||||
attrs.className = 'post-activity post-'+post.contentType()+' '+(attrs.className || '');
|
||||
attrs.className = 'post-activity post-'+dasherize(post.contentType())+' '+(attrs.className || '');
|
||||
|
||||
return super.view([
|
||||
icon(iconName+' post-icon'),
|
||||
|
Reference in New Issue
Block a user