Create listButton component.

Separate from buttonPrimary.
This commit is contained in:
Bryan 2021-10-28 10:16:28 -04:00
parent d425bf3db7
commit 3854b4aa90
3 changed files with 32 additions and 1 deletions

View file

@ -58,7 +58,7 @@
</div>
<div class="row">
<div class="col my-3 d-flex align-items-center">
<buttonPrimary
<listButton
buttonText="List Button"
class="list-button"
/>
@ -75,11 +75,13 @@
<script>
import buttonPrimary from "@/uxComponents/buttonPrimary/buttonPrimary";
import radioCard from "@/uxComponents/radioCard/radioCard";
import listButton from "@/uxComponents/listButton/listButton";
export default {
name: "App",
components: {
buttonPrimary,
radioCard,
listButton
},
};
</script>

View file

@ -0,0 +1 @@
test.todo('some test to be written in the future');

View 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>