Update buttons to use one button for all instances (so far).
This commit is contained in:
parent
7f4aa2ceb0
commit
868897f0d2
3 changed files with 36 additions and 25 deletions
|
|
@ -40,29 +40,24 @@
|
|||
<div class="row">
|
||||
<div class="col my-3 d-flex align-items-center">
|
||||
<buttonPrimary
|
||||
btnText="Primary"
|
||||
buttonText="Primary"
|
||||
buttonType="btn-primary"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col my-3 d-flex align-items-center">
|
||||
<buttonPrimaryFocus
|
||||
btnText="Primary Focus"
|
||||
<buttonPrimary
|
||||
buttonText="Primary Focus"
|
||||
buttonType="btn-primary-focus"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col my-3 d-flex align-items-center">
|
||||
<buttonPrimary class="button-loader"
|
||||
btnText="w/Loader"
|
||||
btnClass="test"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col my-3 d-flex align-items-center">
|
||||
<buttonDisabled
|
||||
btnText="Disabled"
|
||||
<buttonPrimary
|
||||
buttonText="Disabled"
|
||||
buttonType="disabled"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -75,8 +70,6 @@
|
|||
import imageButton from './components/imageButton';
|
||||
import confetti from './components/confetti';
|
||||
import buttonPrimary from './components/buttons/buttonPrimary';
|
||||
import buttonPrimaryFocus from './components/buttons/buttonPrimaryFocus';
|
||||
import buttonDisabled from './components/buttons/buttonDisabled';
|
||||
|
||||
|
||||
export default {
|
||||
|
|
@ -86,9 +79,7 @@
|
|||
vehicleImage,
|
||||
imageButton,
|
||||
confetti,
|
||||
buttonPrimary,
|
||||
buttonPrimaryFocus,
|
||||
buttonDisabled
|
||||
buttonPrimary
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -30,11 +30,11 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
&:disabled {
|
||||
background: $gray-100;
|
||||
background: linear-gradient(270deg, $gray-100 0%, $gray-100 100%);
|
||||
color: $gray-400;
|
||||
}
|
||||
}
|
||||
&.disabled {
|
||||
background: $gray-100;
|
||||
background: linear-gradient(270deg, $gray-100 0%, $gray-100 100%);
|
||||
color: $gray-400;
|
||||
}
|
||||
&.btn-primary-focus {
|
||||
position: relative;//Required for :after pseduo to position correctly
|
||||
|
|
|
|||
|
|
@ -1,10 +1,30 @@
|
|||
<template>
|
||||
<button type="button" class="btn btn-primary d-flex align-items-center">{{btnText}}</button>
|
||||
<button
|
||||
type="button"
|
||||
class="btn d-flex align-items-center"
|
||||
v-on:click="showLoader()"
|
||||
v-bind:class="[(this.isLoading ? 'button-loader' : 'not-loading'),this.buttonType]"
|
||||
>
|
||||
{{ this.buttonText }}
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'buttonPrimary',
|
||||
props: ['btnText']
|
||||
props: {
|
||||
buttonText: String,
|
||||
buttonType: String
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
isLoading: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showLoader(){
|
||||
this.isLoading = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue