iTwin / itwinjs-core

Monorepo for iTwin.js Library
https://www.itwinjs.org
MIT License
615 stars 210 forks source link

Button in toaster #763

Closed ashish-srivastava-dev closed 3 years ago

ashish-srivastava-dev commented 3 years ago

Can I add a button in Toaster message


⚠ Do not edit this section. It is required for imodeljs.github.io ➟ GitHub issue linking

GerardasB commented 3 years ago

Can I add a button in Toaster message

Yes, you are looking for the ReactNotifyMessageDetails which is accepted by the messageDetails of ToastMessageProps.

There is an usage example in ui-test-app: https://github.com/imodeljs/imodeljs/blob/31b96284055241f6e770df94010bd9bbe7be2d88/test-apps/ui-test-app/src/frontend/appui/frontstages/component-examples/ComponentExamplesProvider.tsx#L697