import * as React from 'react'; import JqxButton from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxbuttons'; import JqxCheckBox from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxcheckbox'; import JqxDropDownList from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxdropdownlist'; import JqxExpander from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxexpander'; import JqxNotification from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxnotification'; import JqxRadioButton from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxradiobutton'; class App extends React.PureComponent<{}> { private myNotification = React.createRef(); constructor(props: {}) { super(props); this.openNotificationClick = this.openNotificationClick.bind(this); this.closeLastNotificationClick = this.closeLastNotificationClick.bind(this); this.closeNotificationsClick = this.closeNotificationsClick.bind(this); this.topLeftChecked = this.topLeftChecked.bind(this); this.topRightChecked = this.topRightChecked.bind(this); this.bottomLeftChecked = this.bottomLeftChecked.bind(this); this.bottomRightChecked = this.bottomRightChecked.bind(this); this.onChange = this.onChange.bind(this); this.closeOnClickCheckboxChange = this.closeOnClickCheckboxChange.bind(this); this.autoCloseCheckBoxChange = this.autoCloseCheckBoxChange.bind(this); this.blinkCheckboxChange = this.blinkCheckboxChange.bind(this); } public render() { return (
Welcome to our website.
Open notification Close last notification Close all notifications
jqxNotification settings
Position:
  • Top-Left
  • Top-Right
  • Bottom-Left
  • Bottom-Right

Template:

Close on click Auto close Blink
); } private openNotificationClick(): void { this.myNotification.current!.open(); }; private closeLastNotificationClick(): void { this.myNotification.current!.closeLast(); }; private closeNotificationsClick(): void { this.myNotification.current!.closeAll(); }; private topLeftChecked(): void { this.myNotification.current!.setOptions({ position: 'top-left' }); }; private topRightChecked(): void { this.myNotification.current!.setOptions({ position: 'top-right' }); }; private bottomLeftChecked(): void { this.myNotification.current!.setOptions({ position: 'bottom-left' }); }; private bottomRightChecked(): void { this.myNotification.current!.setOptions({ position: 'bottom-right' }); }; private onChange (event: any): void { const choice = event.args.item.label; let newTemplate; if (choice !== "null") { newTemplate = choice; } else { newTemplate = null; } this.myNotification.current!.setOptions({ template: newTemplate }); }; private closeOnClickCheckboxChange(event: any): void { const checked = event.args.checked; this.myNotification.current!.setOptions({ closeOnClick: checked }); }; private autoCloseCheckBoxChange(event: any): void { const checked = event.args.checked; this.myNotification.current!.setOptions({ autoClose: checked }); }; private blinkCheckboxChange(event: any): void { const checked = event.args.checked; this.myNotification.current!.setOptions({ blink: checked }); }; } export default App;