react-uwp icon indicating copy to clipboard operation
react-uwp copied to clipboard

How to show Toast programmatically?

Open gino8080 opened this issue 6 years ago • 0 comments

I need a way to call and show Toast notifications by code, i mean something like the ant design notification https://ant.design/components/notification/

import { Button, notification } from 'antd';

const openNotification = () => {
  notification.open({
    message: 'Notification Title',
    description:
      'This is the content of the notification. This is the content of the notification. This is the content of the notification.',
    onClick: () => {
      console.log('Notification Clicked!');
    },
  });
};

ReactDOM.render(
  <Button type="primary" onClick={openNotification}>
    Open the notification box
  </Button>,
  mountNode,
);

so I don't have to create che html , and i can show as many as Toast i need it is possible ?

gino8080 avatar May 28 '19 13:05 gino8080