Socket
Socket
Sign inDemoInstall

sweetalert

Package Overview
Dependencies
2
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.1 to 2.1.2

6

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc