A helper for cooked content in a decorator

This commit is contained in:
Robin Ward 2016-02-22 15:19:56 -05:00
parent 65553d7b70
commit fdf0047f56

View file

@ -1,5 +1,6 @@
import Connector from 'discourse/widgets/connector';
import { h } from 'virtual-dom';
import PostCooked from 'discourse/widgets/post-cooked';
class DecoratorHelper {
constructor(widget, attrs, state) {
@ -15,6 +16,10 @@ class DecoratorHelper {
getModel() {
return this.widget.findAncestorModel();
}
cooked(cooked) {
return new PostCooked({ cooked });
}
}
DecoratorHelper.prototype.h = h;