Skip to content

Commit

Permalink
chore: React 19
Browse files Browse the repository at this point in the history
  • Loading branch information
limonte committed Dec 23, 2024
1 parent 26712bb commit a544399
Show file tree
Hide file tree
Showing 4 changed files with 633 additions and 726 deletions.
5 changes: 3 additions & 2 deletions index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React from 'react'
import Swal from 'sweetalert2/dist/sweetalert2.js'
import withReactContent from 'sweetalert2-react-content'
import swal2Formik from './swal2-formik'
import './styles.scss'

const ReactSwal = withReactContent(Swal)
Expand All @@ -18,7 +17,9 @@ async function sayHi() {
text: 'What is your name?',
})

const location = await swal2Formik()
const { value: location } = await ReactSwalWithInput.fire({
html: <strong>Where are you from?</strong>,
})

await Swal.fire(`Hi ${name} from ${location}!`, '', 'success')
}
Expand Down
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,21 @@
"@babel/core": "^7.19.1",
"@babel/plugin-transform-runtime": "^7.19.1",
"@babel/runtime": "^7.19.4",
"@types/react": "^18.0.20",
"@types/react-dom": "^18.0.5",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"css-loader": "^7.0.0",
"sass": "^1.54.9",
"sass-loader": "^16.0.0",
"style-loader": "^4.0.0",
"ts-loader": "^9.3.1",
"typescript": "~5.5.0",
"typescript": "~5.7.0",
"webpack": "^5.76.0",
"webpack-cli": "^5.0.0"
"webpack-cli": "^6.0.0"
},
"dependencies": {
"@sweetalert2/theme-dark": "^5.0.12",
"formik": "^2.2.9",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"sweetalert2": "^11.5.2",
"sweetalert2-react-content": "^5.0.3"
},
Expand Down
55 changes: 0 additions & 55 deletions swal2-formik.tsx

This file was deleted.

Loading

0 comments on commit a544399

Please sign in to comment.