Skip to content

Commit

Permalink
fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
niklaswolf committed Jun 21, 2024
1 parent 6b40ab4 commit 61a637e
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 67 deletions.
86 changes: 44 additions & 42 deletions playground/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,54 +6,56 @@ const CreditCardToken = ref()
const IdealError = ref()
</script>
<template>
<h1>Nuxt mollie payments components</h1>
<div>
<h1>Nuxt mollie payments components</h1>

<h2>Credit Card</h2>
<h2>Credit Card</h2>

<ShopwareFrontendsCreditCard
submit-button-label="Save"
locale="en_US"
:submit-disabled="!!CreditCardToken"
@submit="
(token) => {
CreditCardToken = `${token} ✔️`
CreditCardError = null
}
"
@error="
(message) => {
CreditCardError = `${message} ❌`
}
"
/>
<ShopwareFrontendsCreditCard
submit-button-label="Save"
locale="en_US"
:submit-disabled="!!CreditCardToken"
@submit="
(token) => {
CreditCardToken = `${token} ✔️`
CreditCardError = null
}
"
@error="
(message) => {
CreditCardError = `${message} ❌`
}
"
/>

<div class="demo-mollie-results">
<div>
Test Credit Number:
<pre>2223 0000 1047 9399</pre>
<div class="demo-mollie-results">
<div>
Test Credit Number:
<pre>2223 0000 1047 9399</pre>
</div>
<hr />
<div v-if="CreditCardError">Error: {{ CreditCardError }}</div>
<div v-if="CreditCardToken">Token: {{ CreditCardToken }}</div>
</div>
<hr />
<div v-if="CreditCardError">Error: {{ CreditCardError }}</div>
<div v-if="CreditCardToken">Token: {{ CreditCardToken }}</div>
</div>

<h2>Ideal</h2>
<h2>Ideal</h2>

<ShopwareFrontendsIdeal
locale="en_US"
select-label="Please choose your bank:"
select-disabled-option="Select your bank"
@save-issuer-success="
() => {
IdealError = null
}
"
@save-issuer-error="
(message) => {
IdealError = `${message} ❌`
}
"
/>
<ShopwareFrontendsIdeal
locale="en_US"
select-label="Please choose your bank:"
select-disabled-option="Select your bank"
@save-issuer-success="
() => {
IdealError = null
}
"
@save-issuer-error="
(message) => {
IdealError = `${message} ❌`
}
"
/>
</div>
</template>
<style scoped>
.demo-mollie-results {
Expand Down
53 changes: 28 additions & 25 deletions playground/pages/without.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,34 @@ const CreditCardToken = ref()
</script>

<template>
<h1>Load Mollie script lazily</h1>
<div>On this page the scripts load lazily, if the button is clicked.</div>
<div>To test this, the option <i>isIncludedGlobally: false</i> has to be set in nuxt config.</div>

<p>
<button @click="show = !show">{{show ? 'Hide' : 'Show'}} payment components</button>
<p v-if="show">
<LazyShopwareFrontendsCreditCard
submit-button-label="Save"
locale="en_US"
:submit-disabled="!!CreditCardToken"
@submit="
(token) => {
CreditCardToken = `${token} ✔️`
CreditCardError = null
}
"
@error="
(message) => {
CreditCardError = `${message} ❌`
}
"
/>
</p>
</p>
<div>
<h1>Load Mollie script lazily</h1>
<div>On this page the scripts load lazily, if the button is clicked.</div>
<div>To test this, the option <i>isIncludedGlobally: false</i> has to be set in nuxt config.</div>
<br />
<br />
<div>
<button @click="show = !show">{{ show ? 'Hide' : 'Show' }} payment components</button>
<p v-if="show">
<LazyShopwareFrontendsCreditCard
submit-button-label="Save"
locale="en_US"
:submit-disabled="!!CreditCardToken"
@submit="
(token) => {
CreditCardToken = `${token} ✔️`
CreditCardError = null
}
"
@error="
(message) => {
CreditCardError = `${message} ❌`
}
"
/>
</p>
</div>
</div>
</template>

<style scoped></style>

0 comments on commit 61a637e

Please sign in to comment.