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