Update buttonPrimary, listButton, radioCard.
NOTE: disabled button now has dynamic aria-disabled element.
This commit is contained in:
parent
3854b4aa90
commit
ccc0f485b0
5 changed files with 23 additions and 50 deletions
18
src/App.vue
18
src/App.vue
|
|
@ -36,23 +36,6 @@
|
||||||
<div class="col my-3 d-flex align-items-center">
|
<div class="col my-3 d-flex align-items-center">
|
||||||
<buttonPrimary
|
<buttonPrimary
|
||||||
buttonText="Primary"
|
buttonText="Primary"
|
||||||
class="btn-primary"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col my-3 d-flex align-items-center">
|
|
||||||
<buttonPrimary
|
|
||||||
buttonText="Primary Focus"
|
|
||||||
class="btn-primary-focus"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col my-3 d-flex align-items-center">
|
|
||||||
<buttonPrimary
|
|
||||||
buttonText="Disabled"
|
|
||||||
class="disabled"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -60,7 +43,6 @@
|
||||||
<div class="col my-3 d-flex align-items-center">
|
<div class="col my-3 d-flex align-items-center">
|
||||||
<listButton
|
<listButton
|
||||||
buttonText="List Button"
|
buttonText="List Button"
|
||||||
class="list-button"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
//Custom button styles
|
//Custom button styles
|
||||||
.btn {
|
.btn {
|
||||||
&.btn-primary,
|
&.btn-primary {
|
||||||
&.btn-primary-focus {
|
|
||||||
position: relative;
|
position: relative;
|
||||||
background: $blue-700;
|
background: $blue-700;
|
||||||
background: linear-gradient(270deg, rgba(21,116,161,1) 0%, rgba(18,91,126,1) 100%);
|
background: linear-gradient(270deg, rgba(21,116,161,1) 0%, rgba(18,91,126,1) 100%);
|
||||||
|
|
@ -13,6 +12,12 @@
|
||||||
&: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%);
|
||||||
}
|
}
|
||||||
|
&:focus {
|
||||||
|
outline: none;
|
||||||
|
box-shadow: 0 0 0 3px, 0 0 0 5.5px $blue-700;
|
||||||
|
background-color: #da291c;
|
||||||
|
border-color: #da291c;
|
||||||
|
}
|
||||||
&.button-loader {
|
&.button-loader {
|
||||||
padding: 0 40px 0 12px;
|
padding: 0 40px 0 12px;
|
||||||
&:after {
|
&:after {
|
||||||
|
|
@ -31,30 +36,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&.disabled {
|
&:disabled {
|
||||||
background: $gray-100;
|
background: $gray-100 !important;
|
||||||
background: linear-gradient(270deg, $gray-100 0%, $gray-100 100%);
|
background: linear-gradient(270deg, $gray-100 0%, $gray-100 100%) !important;
|
||||||
color: $gray-400;
|
color: $gray-400 !important;
|
||||||
}
|
height: 48px;
|
||||||
&.btn-primary-focus {
|
border: none;
|
||||||
position: relative;//Required for :after pseduo to position correctly
|
border-radius: $border-radius-lg;
|
||||||
margin: 5px;//Because :after is position absolute and isn't accounted for in DOM
|
|
||||||
&:before {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
width: calc(100% + 12px);
|
|
||||||
height: calc(100% + 12px);
|
|
||||||
border: 3px solid $blue-700;
|
|
||||||
background-color: $white;
|
|
||||||
border-radius: 12px;
|
|
||||||
left: -6px;
|
|
||||||
top: -6px;
|
|
||||||
z-index: -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&.btn-funnel {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
}
|
}
|
||||||
&.list-button {
|
&.list-button {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<button
|
<button
|
||||||
class="btn d-flex align-items-center"
|
:disabled="isDisabled"
|
||||||
|
:aria-disabled="isDisabled"
|
||||||
|
class="btn btn-primary d-flex align-items-center"
|
||||||
v-on:click="showLoader()"
|
v-on:click="showLoader()"
|
||||||
v-bind:class="[this.isLoading ? 'button-loader' : 'not-loading']"
|
v-bind:class="[this.isLoading ? 'button-loader' : 'not-loading']"
|
||||||
>
|
>
|
||||||
|
|
@ -17,6 +19,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
|
isDisabled: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<button
|
<button
|
||||||
class="btn d-flex align-items-center"
|
class="btn list-button d-flex align-items-center"
|
||||||
v-on:click="showLoader()"
|
v-on:click="showLoader()"
|
||||||
v-bind:class="[this.isLoading ? 'button-loader' : 'not-loading']"
|
v-bind:class="[this.isLoading ? 'button-loader' : 'not-loading']"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,12 @@
|
||||||
<input
|
<input
|
||||||
type="radio"
|
type="radio"
|
||||||
class="position-absolute opacity-0"
|
class="position-absolute opacity-0"
|
||||||
v-bind:class="className"
|
:class="className"
|
||||||
v-bind:id="radioID"
|
:id="radioID"
|
||||||
v-bind:name="groupName"
|
:name="groupName"
|
||||||
:value="radioLabel"
|
:value="radioLabel"
|
||||||
v-model="picked"
|
v-model="picked"
|
||||||
v-bind:tabindex="tabIndex"
|
:tabindex="tabIndex"
|
||||||
/>
|
/>
|
||||||
<label
|
<label
|
||||||
v-bind:for="radioID"
|
v-bind:for="radioID"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue