Skip to content

Commit

Permalink
chore: sandbox.jsx -> sandbox.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
limonte committed Oct 31, 2023
1 parent 59a1369 commit 13b6fc7
Show file tree
Hide file tree
Showing 4 changed files with 154 additions and 168 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
</head>
<body>
<div id="root"></div>
<script type="module" src="/test/sandbox.jsx"></script>
<script type="module" src="/test/sandbox.tsx"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"src/**/*.{js,d.ts}"
],
"scripts": {
"start": "vite",
"dev": "vite",
"cypress:open": "cypress open",
"check-dts": "tsc src/sweetalert2-react-content.d.ts --lib dom,es6",
"lint": "eslint . --ext .js,.jsx,.d.ts && prettier . --check",
Expand Down
4 changes: 1 addition & 3 deletions test/sandbox.jsx → test/sandbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ import React, { useState } from 'react'
import Swal from 'sweetalert2/dist/sweetalert2.all'
import withReactContent from '../src/index'

let MySwal = withReactContent(Swal)

function App() {
const [inputValue, setInputValue] = useState('')

function showSwal() {
MySwal.fire({
withReactContent(Swal).fire({
title: <i>Input something</i>,
input: 'text',
inputValue,
Expand Down
Loading

0 comments on commit 13b6fc7

Please sign in to comment.