sweetalert
Advanced tools
Comparing version 2.1.1 to 2.1.2
{ | ||
"name": "sweetalert", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"description": "A beautiful replacement for JavaScript's \"alert\"", | ||
@@ -26,3 +26,3 @@ "main": "dist/sweetalert.min.js", | ||
], | ||
"author": "Tristan Edwards <tristan.edwards@me.com> (http://tristanedwards.me)", | ||
"author": "Tristan Edwards <tristan.edwards@me.com> (https://tristanedwards.me)", | ||
"license": "MIT", | ||
@@ -66,2 +66,4 @@ "bugs": { | ||
"source-map-loader": "0.2.1", | ||
"sweetalert": "file:./", | ||
"@sweetalert/with-react": "^0.1.1", | ||
"style-loader": "0.18.2", | ||
@@ -68,0 +70,0 @@ "ts-jest": "19.0.14", |
@@ -51,2 +51,3 @@ <p align="center"> | ||
- [Advanced examples](https://sweetalert.js.org/guides/#advanced-examples) | ||
- [Using with libraries](https://sweetalert.js.org/guides/#using-with-libraries) | ||
- [Upgrading from 1.X](https://sweetalert.js.org/guides/#upgrading-from-1x) | ||
@@ -157,2 +158,24 @@ | ||
## Using with React | ||
SweetAlert has tools for [integrating with your favourite rendering library](https://sweetalert.js.org/guides/#using-with-libraries). | ||
If you're using React, you can install [SweetAlert with React](https://www.npmjs.com/package/@sweetalert/with-react) in addition to the main library, and easily add React components to your alerts like this: | ||
```javascript | ||
import React from 'react' | ||
import swal from '@sweetalert/with-react' | ||
swal( | ||
<div> | ||
<h1>Hello world!</h1> | ||
<p> | ||
This is now rendered with JSX! | ||
</p> | ||
</div> | ||
) | ||
``` | ||
[Read more about integrating with React](http://localhost:3000/guides#using-react) | ||
## Contributing | ||
@@ -159,0 +182,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
58141
221
0
47