Create listButton component.
Separate from buttonPrimary.
This commit is contained in:
parent
d425bf3db7
commit
3854b4aa90
3 changed files with 32 additions and 1 deletions
|
|
@ -58,7 +58,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col my-3 d-flex align-items-center">
|
<div class="col my-3 d-flex align-items-center">
|
||||||
<buttonPrimary
|
<listButton
|
||||||
buttonText="List Button"
|
buttonText="List Button"
|
||||||
class="list-button"
|
class="list-button"
|
||||||
/>
|
/>
|
||||||
|
|
@ -75,11 +75,13 @@
|
||||||
<script>
|
<script>
|
||||||
import buttonPrimary from "@/uxComponents/buttonPrimary/buttonPrimary";
|
import buttonPrimary from "@/uxComponents/buttonPrimary/buttonPrimary";
|
||||||
import radioCard from "@/uxComponents/radioCard/radioCard";
|
import radioCard from "@/uxComponents/radioCard/radioCard";
|
||||||
|
import listButton from "@/uxComponents/listButton/listButton";
|
||||||
export default {
|
export default {
|
||||||
name: "App",
|
name: "App",
|
||||||
components: {
|
components: {
|
||||||
buttonPrimary,
|
buttonPrimary,
|
||||||
radioCard,
|
radioCard,
|
||||||
|
listButton
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
1
src/uxComponents/listButton/listButton.spec.js
Normal file
1
src/uxComponents/listButton/listButton.spec.js
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
test.todo('some test to be written in the future');
|
||||||
28
src/uxComponents/listButton/listButton.vue
Normal file
28
src/uxComponents/listButton/listButton.vue
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
<template>
|
||||||
|
<button
|
||||||
|
class="btn d-flex align-items-center"
|
||||||
|
v-on:click="showLoader()"
|
||||||
|
v-bind:class="[this.isLoading ? 'button-loader' : 'not-loading']"
|
||||||
|
>
|
||||||
|
{{ this.buttonText }}
|
||||||
|
</button>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "listButton",
|
||||||
|
props: {
|
||||||
|
buttonText: String
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isLoading: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
showLoader() {
|
||||||
|
this.isLoading = true;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
Loading…
Reference in a new issue