Skip to content

Commit

Permalink
Support image
Browse files Browse the repository at this point in the history
  • Loading branch information
Bunlong committed Sep 19, 2021
1 parent b8f5f7b commit b88a4a9
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11,478 deletions.
37 changes: 19 additions & 18 deletions supports/create-react-app/src/App.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
import logo from './logo.svg';
import './App.css';

import { useQRCode } from 'next-qrcode';

function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
);
const { inputRef } = useQRCode({
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',
},
},
});

return <img ref={inputRef} />;
}

export default App;
Loading

0 comments on commit b88a4a9

Please sign in to comment.