Last active
February 20, 2023 14:20
-
-
Save YonatanKra/2284f31412c7a8958f6e16dc691dbda6 to your computer and use it in GitHub Desktop.
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
function generateCardContent(question) { | |
return ` | |
<div slot="main"> | |
<pre> | |
${question.selector} { | |
${question.properties.reduce((res, val) => { | |
return `${res} | |
${val}: | |
` | |
}, '')} | |
} | |
</pre> | |
${question.properties.reduce((res, val) => { | |
return ` | |
${res} | |
<vwc-text-field label="${val}" id="${val}"></vwc-text-field> | |
` | |
}, '')} | |
<div style="text-align: center; margin-top: 5px;"> | |
<vwc-button appearance="filled" connotation="cta" onclick="verifyAnswer(${question.id})" label="Submit"></vwc-button> | |
</div> | |
</div> | |
`; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment