Gathering detailed insights and metrics for @nagnu/sweetalert2-react-content
Gathering detailed insights and metrics for @nagnu/sweetalert2-react-content
Gathering detailed insights and metrics for @nagnu/sweetalert2-react-content
Gathering detailed insights and metrics for @nagnu/sweetalert2-react-content
npm install @nagnu/sweetalert2-react-content
Typescript
Module System
Node Version
NPM Version
68.9
Supply Chain
78.7
Quality
75.1
Maintenance
50
Vulnerability
100
License
JavaScript (93.9%)
TypeScript (3.34%)
HTML (1.7%)
CSS (1.07%)
Total Downloads
462
Last Day
3
Last Week
5
Last Month
18
Last Year
102
707 Stars
294 Commits
51 Forks
15 Watching
3 Branches
7 Contributors
Minified
Minified + Gzipped
Latest Version
5.0.9
Package Id
@nagnu/sweetalert2-react-content@5.0.9
Unpacked Size
96.48 kB
Size
14.07 kB
File Count
19
NPM Version
9.6.7
Node Version
18.17.1
Publised On
05 Nov 2023
Cumulative downloads
Total Downloads
Last day
-25%
3
Compared to previous day
Last week
-16.7%
5
Compared to previous week
Last month
500%
18
Compared to previous month
Last year
-53.4%
102
Compared to previous year
3
25
Official SweetAlert2 enhancer adding support for React elements as content.
The following options can be React elements:
1npm install --save sweetalert2 sweetalert2-react-content
1import Swal from 'sweetalert2' 2import withReactContent from 'sweetalert2-react-content' 3 4const MySwal = withReactContent(Swal) 5 6MySwal.fire({ 7 title: <p>Hello World</p>, 8 didOpen: () => { 9 // `MySwal` is a subclass of `Swal` with all the same instance & static methods 10 MySwal.showLoading() 11 }, 12}).then(() => { 13 return MySwal.fire(<p>Shorthand works too</p>) 14})
The dist/sweetalert2-react-content.umd.js
file defines window.sweetalert2ReactContent
in non-CJS/AMD environments.
SweetAlert2 renders its content outside of the ReactTree
. In order to render React Router components (such as Link
) you have to wrap them in the routing context which should be the same with the app.
That can be achived by using the HistoryRouter
with shared history
. Please refer to the official code example ↗️
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
6 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 5
Reason
5 existing vulnerabilities detected
Details
Reason
Found 0/17 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More