import * as React from "react"; import { Button, Segment } from "semantic-ui-react"; import { injectState, MqttApiState } from "@app/state"; import { getRandomId } from "@common/utils"; class MessageTest extends React.Component<{ state: MqttApiState }> { render() { return (

Message Test

); } private test1 = () => { this.props.state.uiStore.addMessage({ info: true, content: "Test Message! " + getRandomId(), header: "Header to test message", }); } private test2 = () => { this.props.state.uiStore.addMessage({ warning: true, content: "Im gonna dissapear in 5 seconds " + getRandomId(), header: "Header to test message", timeout: 5000, }); } private test3 = () => { this.props.state.uiStore.addMessage({ color: "brown", content:
I Have crazy content!
, header: "Header to test message", timeout: 5000, }); } } export default injectState(MessageTest);