hardlounge/client/components/ParsedMessage.vue

25 lines
454 B
Vue
Raw Normal View History

<script>
const parse = require("../js/helpers/parse");
export default {
name: "ParsedMessage",
2018-07-12 08:26:12 +00:00
functional: true,
props: {
2018-07-12 08:41:40 +00:00
text: String,
message: Object,
2018-07-19 17:44:24 +00:00
network: Object,
},
render(createElement, context) {
2018-07-19 17:44:24 +00:00
return parse(
createElement,
2019-07-17 09:33:59 +00:00
typeof context.props.text !== "undefined"
? context.props.text
: context.props.message.text,
2018-07-19 17:44:24 +00:00
context.props.message,
2019-11-09 22:21:34 +00:00
context.props.network,
context.parent.$root
2018-07-19 17:44:24 +00:00
);
},
};
</script>