Skip to content

Commit

Permalink
Add DblClick setting option
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremiah-carlson committed Sep 19, 2023
1 parent afae8fe commit ceae66e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion www/src/components/MainInput.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const MainInput = ()=>{
return (
<div class="w-1/2 h-0 overflow-hidden">
<input id="MainInput" onBlur="this.focus()" autocomplete="off" class="w-full h-16 rounded-md p-4 text-2xl" value={mainInputVal()}></input>
<input type='submit' hidden></input>
<button id="MainSubmit" type='submit' hidden></button>
</div>

);
Expand Down
9 changes: 9 additions & 0 deletions www/src/components/QR.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import QRCode from 'qrcode';

const qrClick = (data, event)=>{
let inp = document.querySelector("#MainInput");
inp.innerHTML=data;
inp.value = data;
document.querySelector("#MainSubmit").click();
}

const QR = (props)=>{
let qrUrl = '';

Expand All @@ -16,7 +23,9 @@ const QR = (props)=>{
return (
<div class="flex flex-col justify-center align-middle">
<h1 class="text-slate-200 text-center font-bold">{props.label}</h1>
<a href="#" onDblClick={[qrClick, props.qrString]} class='z-200'>
<div class={`${props.rounded} overflow-clip flex flex-col justify-center align-middle`} innerHTML={qrUrl}></div>
</a>
</div>
);
};
Expand Down

0 comments on commit ceae66e

Please sign in to comment.