Skip to content

Modals and notifications

Kurt Junghanns edited this page Sep 28, 2016 · 5 revisions

In order to have same looking modals and notifications in each component, we decided to use sweetalert2 with semantic-ui.

This page describes how to create modals and notifications.

Preconditions

Remarks

How to

  1. Just use JavaScript - no HTML in the render function needed
  2. Make sure you set buttonsStyling to false buttonsStyling: false
  3. Set the semantic-ui button classes you will need in confirmButtonClass and cancelButtonClass
  4. Use functions of the component as callbacks (or then functions)

Examples

Error

swal({ title: 'Error', text: "Nooooooo", type: 'error', confirmButtonText: 'Yes, delete it!', confirmButtonClass: 'ui button', buttonsStyling: false })

Clone this wiki locally