Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Bunlong/react-qrcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bunlong committed Jun 2, 2022
2 parents f01199e + 4d01c91 commit 7f4de68
Show file tree
Hide file tree
Showing 7 changed files with 1,709 additions and 59 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 2.1.0 (2022-06-02)

### ✨ Features

* Support React 18

Credits

* [@Bunlong](https://github.com/Bunlong)

## 2.0.0 (2022-02-02)

### ✨ Features
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,9 @@ export default App;

## 📜 Changelog

Latest version 2.0.0 (2022-02-02):
Latest version 2.1.0 (2022-06-02):

* Improve code performance
* Rewrite any existing hooks
* Support React 18

Details changes for each release are documented in the [CHANGELOG.md](https://github.com/Bunlong/next-qrcode/blob/master/CHANGELOG.md).

Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next-qrcode",
"version": "2.0.0",
"version": "2.1.0",
"description": "React hooks for generating QR code for your next React apps.",
"author": "Bunlong <bunlong.van@gmail.com>",
"license": "MIT",
Expand Down Expand Up @@ -49,8 +49,8 @@
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^20.0.0",
"@rollup/plugin-node-resolve": "^13.0.4",
"@types/react": "^17.0.19",
"@types/react-dom": "^17.0.9",
"@types/react": "^18.0.10",
"@types/react-dom": "^18.0.5",
"@types/react-test-renderer": "^17.0.1",
"@typescript-eslint/eslint-plugin": "^4.29.3",
"@typescript-eslint/parser": "^4.29.3",
Expand All @@ -61,16 +61,16 @@
"jest": "^27.1.0",
"mutationobserver-shim": "^0.3.7",
"prettier": "^2.3.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-scripts": "^4.0.3",
"react-test-renderer": "^17.0.2",
"rollup": "^2.56.3",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "^0.30.0",
"ts-jest": "^27.0.5",
"tslib": "^2.3.1",
"typescript": "^4.4.2"
"typescript": "^4.7.2"
},
"files": [
"dist"
Expand All @@ -97,8 +97,8 @@
}
],
"peerDependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-scripts": "^4.0.3"
"react": ">=17.0.0",
"react-dom": ">=17.0.0",
"react-scripts": ">=4.0.0"
}
}
6 changes: 2 additions & 4 deletions supports/create-next-app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,10 @@
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local
.env*.local

# vercel
.vercel
Expand Down
19 changes: 10 additions & 9 deletions supports/create-next-app/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "create-next-app",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
Expand All @@ -8,16 +9,16 @@
"lint": "next lint"
},
"dependencies": {
"next": "12.0.8",
"next-qrcode": "file:../..",
"react": "17.0.2",
"react-dom": "17.0.2"
"next": "12.1.6",
"react": "18.1.0",
"react-dom": "18.1.0"
},
"devDependencies": {
"@types/node": "17.0.10",
"@types/react": "17.0.38",
"eslint": "8.7.0",
"eslint-config-next": "12.0.8",
"typescript": "4.5.5"
"@types/node": "17.0.38",
"@types/react": "18.0.10",
"@types/react-dom": "18.0.5",
"eslint": "8.16.0",
"eslint-config-next": "12.1.6",
"typescript": "4.7.2"
}
}
50 changes: 16 additions & 34 deletions supports/create-next-app/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,24 @@ import type { NextPage } from 'next'
import { useQRCode } from 'next-qrcode';

const Home: NextPage = () => {
const { Image, Canvas } = useQRCode();
const { Canvas } = useQRCode();

return (
<>
<Image
text={'https://github.com/bunlong/next-qrcode'}
options={{
type: 'image/jpeg',
quality: 0.3,
level: 'M',
margin: 3,
scale: 4,
width: 200,
color: {
dark: '#010599FF',
light: '#FFBF60FF',
},
}}
/>
<br />
<Canvas
text={'https://github.com/bunlong/next-qrcode'}
options={{
type: 'image/jpeg',
quality: 0.3,
level: 'M',
margin: 3,
scale: 4,
width: 200,
color: {
dark: '#010599FF',
light: '#FFBF60FF',
},
}}
/>
</>
<Canvas
text={'https://github.com/bunlong/next-qrcode'}
options={{
type: 'image/jpeg',
quality: 0.3,
level: 'M',
margin: 3,
scale: 4,
width: 200,
color: {
dark: '#010599FF',
light: '#FFBF60FF',
},
}}
/>
)
}

Expand Down
Loading

0 comments on commit 7f4de68

Please sign in to comment.