import * as React from 'react'; import JqxButton from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxbuttons'; import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification'; class App extends React.PureComponent<{}> { private myNotification = React.createRef(); private quotes: string[] = [ 'I\'m gonna make him an offer he can\'t refuse.', 'Toto, I\'ve got a feeling we\'re not in Kansas anymore.', 'You talkin\' to me?', 'Bond. James Bond.', 'I\'ll be back.', 'Round up the usual suspects.', 'I\'m the king of the world!', 'A martini. Shaken, not stirred.', 'May the Force be with you.', 'Well, nobody\'s perfect.' ]; constructor(props: {}) { super(props); this.onClick = this.onClick.bind(this); } public render() { return (
Open notification
); } private onClick(): void { document.getElementById('content')!.innerHTML = this.quotes[Math.round(Math.random() * this.quotes.length - 1)]; this.myNotification.current!.open(); }; } export default App;