Skip to content

v2.0.0

Compare
Choose a tag to compare
@Basaingeal Basaingeal released this 05 Nov 22:24

v2.0.0

sweetalert2 released v9 which introduced some breaking changes and new deprecations. (Remember, this library does not include deprecated items.)

Breaking Changes

馃敶 Breaking change 1 - rename Type to Icon

Old

Swal.FireAsync(new SweetAlertOptions{
  Type = SweetAlertType.Success
});

New

Swal.FireAsync(new SweetAlertOptions{
  Icon = SweetAlertIcon.Success
});

Implicit string conversion still works the same way.

Swal.FireAsync(new SweetAlertOptions{
  Icon = "success"
});

馃敶 Breaking change 2 - Deprecated API methods and params were removed

  • SweetAlertOptions.Animated removed. (use SweetAlertOptions.ShowClass and SweetAlertOptions.HideClass now.)
  • SweetAlertService.ShowProgressStepsAsync() and SweetAlertService.HideProgressStepsAsync() removed.

New Features

馃帀 ShowClass and HideClass

Now, it's possible to change showing/hiding animations of popups:

Swal.FireAsync(new SweetAlertOptions{
  ShowClass = new SweetAlertShowClass {
    Popup = "...",
    Backdrop = "...",
    Icon = "..."
  },
  HideClass = new SweetAlertHideClass {
    Popup = "...",
    Backdrop = "...",
    Icon = "..."
  }
});

馃帀 IconHtml

Use any HTML inside icons (e.g. Font Awesome)

Swal.FireAsync(new SweetAlertOptions {
  Icon = "success",
  IconHtml = "<i class=\"far fa-thumbs-up\"></i>"
});

Changes:

See More
  • a60d180 v2.0.0 changes
  • 0017610 fix timmer typo
  • 9f92bbf Merge pull request #272 from Basaingeal/dependabot/npm_and_yarn/develop/types/node-12.12.6
  • a559a55 Bump @types/node from 12.12.5 to 12.12.6
  • bb6c7fc Merge pull request #268 from Basaingeal/dependabot/npm_and_yarn/develop/typescript-3.7.2
  • d7f5905 Bump typescript from 3.6.4 to 3.7.2
  • f492854 bump sweetalert2
  • 8e70b5b bump dependencies
  • 25fbaf7 Merge pull request #267 from Basaingeal/dependabot/npm_and_yarn/develop/babel/preset-env-7.7.1
  • 979827b Bump @babel/preset-env from 7.7.0 to 7.7.1
  • 4fd87cd Merge pull request #261 from Basaingeal/feature/sweetalert2-v9
  • 16be1ab prettier formatting
  • 00f4914 bump sweetalert2 and babel
  • 0f29efb add iconHtml
  • 8e0f842 include icon replacement in readme
  • 5c8e9f5 add showClass and hideClass
  • 29eb09f remove depracations, update sweetalert, and fix build
  • d1a0bc1 Merge pull request #256 from Basaingeal/dependabot/npm_and_yarn/develop/typescript-eslint/parser-2.6.1
  • 900fab1 Bump @typescript-eslint/parser from 2.6.0 to 2.6.1
  • 907376a Merge pull request #255 from Basaingeal/dependabot/npm_and_yarn/develop/typescript-eslint/eslint-plugin-2.6.1
  • 89e57c8 Bump @typescript-eslint/eslint-plugin from 2.6.0 to 2.6.1
  • 53da03f Merge pull request #254 from Basaingeal/release/v1.2.4

This list of changes was auto generated.