Skip to content

Commit 0895578

Browse files
refactor(core): further improve extensibility of CommentPost
1 parent 87637b8 commit 0895578

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

framework/core/js/src/forum/components/CommentPost.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,23 @@ export default class CommentPost extends Post {
4747
}
4848

4949
content() {
50-
return super.content().concat([
50+
return super.content().concat(this.contentItems().toArray());
51+
}
52+
53+
contentItems() {
54+
const items = new ItemList();
55+
56+
items.add(
57+
'header',
5158
<header className="Post-header">
5259
<ul>{listItems(this.headerItems().toArray())}</ul>
5360
</header>,
54-
<div className="Post-body">{this.bodyItems().toArray()}</div>,
55-
]);
61+
100
62+
);
63+
64+
items.add('body', <div className="Post-body">{this.bodyItems().toArray()}</div>, 90);
65+
66+
return items;
5667
}
5768

5869
bodyItems() {

0 commit comments

Comments
 (0)