Button updates. Add disabled button.

This commit is contained in:
Bryan 2021-10-19 09:36:12 -04:00
parent 4062405fd1
commit 7f4aa2ceb0
5 changed files with 33 additions and 7 deletions

View file

@ -55,6 +55,14 @@
<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"
/>
</div>
</div>
@ -68,6 +76,7 @@
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 {
@ -78,7 +87,8 @@
imageButton,
confetti,
buttonPrimary,
buttonPrimaryFocus
buttonPrimaryFocus,
buttonDisabled
}
}
</script>

View file

@ -9,17 +9,18 @@
border-radius: $border-radius-lg;
height: 48px;
color: $white;
transition: all 100ms linear;
transition: all 150ms linear;
&:hover {
background: linear-gradient(270deg, rgba(6,87,124,1) 0%, rgba(6,87,124,1) 100%);
}
&.button-loader {
padding: 0 48px 0 12px;
padding: 0 40px 0 12px;
&:after {
content: url(../../assets/img/icons/button-spinner.svg);
position: absolute;
width: 24px;
height: 24px;
right: 14px;
width: 16px;
height: 16px;
margin-left: 12px;
animation: rotation 1s infinite linear;
@keyframes rotation {
@ -29,6 +30,11 @@
}
}
}
&: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

View file

@ -0,0 +1,10 @@
<template>
<button type="button" class="btn btn-primary" disabled>{{btnText}}</button>
</template>
<script>
export default {
name: 'buttonDisabled',
props: ['btnText']
}
</script>

View file

@ -1,5 +1,5 @@
<template>
<button type="button" class="btn btn-primary">{{btnText}}</button>
<button type="button" class="btn btn-primary d-flex align-items-center">{{btnText}}</button>
</template>
<script>

View file

@ -1,5 +1,5 @@
<template>
<button type="button" class="btn btn-primary-focus">{{btnText}}</button>
<button type="button" class="btn btn-primary-focus d-flex align-items-center">{{btnText}}</button>
</template>
<script>