Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
alevilar authored Feb 9, 2022
1 parent 8e8b433 commit 1547249
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Generates a QR using href property and shows a checkmark if the done prop is pre

How dows it works?

'''html
```html
<script type="module">
// import stencil js component
import { defineCustomElements } from "https://cdn.jsdelivr.net/npm/[email protected]/dist/loader/index.es2017.js";
Expand All @@ -23,20 +23,19 @@ How dows it works?

<!-- YOUR HTML STUFF -->

<div class="qr-container">
<qr-pay id="qr" href="QR-PAY IS AWSOME" width=180></qr-pay>
</div>
<button onclick="done()">DONE</button>
<button onclick="undone()">UNDONE</button>
</div>
<qr-pay id="qr" href="ANY_TEXT_CANT_GO_HERE" width=180></qr-pay>

<button onclick="done()">DONE</button>
<button onclick="undone()">UNDONE</button>


<script>
// with JS change "done" property for showing the checkmark
const qr = document.getElementById("qr");
const done = () => qr.setAttribute("done", true);
const undone = () => qr.setAttribute("done", false);
</script>
'''
```



0 comments on commit 1547249

Please sign in to comment.