-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
7 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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"; | ||
|
@@ -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> | ||
''' | ||
``` | ||
|
||
|
||
|