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"> <div class="col my-3 d-flex align-items-center">
<buttonPrimary class="button-loader" <buttonPrimary class="button-loader"
btnText="w/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>
</div> </div>
@ -68,6 +76,7 @@
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 buttonPrimaryFocus from './components/buttons/buttonPrimaryFocus';
import buttonDisabled from './components/buttons/buttonDisabled';
export default { export default {
@ -78,7 +87,8 @@
imageButton, imageButton,
confetti, confetti,
buttonPrimary, buttonPrimary,
buttonPrimaryFocus buttonPrimaryFocus,
buttonDisabled
} }
} }
</script> </script>

View file

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

View file

@ -1,5 +1,5 @@
<template> <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> </template>
<script> <script>