Merge pull request #93 from Safelite/brm-css-back-button-component
Add back button component.
This commit is contained in:
commit
e6a10324cb
4 changed files with 78 additions and 1 deletions
|
|
@ -35,7 +35,10 @@
|
||||||
</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 buttonText="Primary" loaderColor="white" sizeInRem="1" />
|
<buttonPrimary
|
||||||
|
buttonText="Primary"
|
||||||
|
loaderColor="white"
|
||||||
|
sizeInRem="1" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
@ -47,6 +50,11 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col my-3 d-flex align-items-center">
|
||||||
|
<buttonBack/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="row my-4">
|
<div class="row my-4">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<h4 class="m-0 p-2 bg-light rounded">List Button</h4>
|
<h4 class="m-0 p-2 bg-light rounded">List Button</h4>
|
||||||
|
|
@ -429,6 +437,7 @@
|
||||||
<script>
|
<script>
|
||||||
import buttonPrimary from "@/ux-components/button-primary/button-primary";
|
import buttonPrimary from "@/ux-components/button-primary/button-primary";
|
||||||
import buttonSecondary from "@/ux-components/button-secondary/button-secondary";
|
import buttonSecondary from "@/ux-components/button-secondary/button-secondary";
|
||||||
|
import buttonBack from "@/ux-components/button-back/button-back";
|
||||||
import radioCard from "@/ux-components/radio-card/radio-card";
|
import radioCard from "@/ux-components/radio-card/radio-card";
|
||||||
import listButton from "@/ux-components/list-button/list-button";
|
import listButton from "@/ux-components/list-button/list-button";
|
||||||
import radio from "@/ux-components/radio/radio";
|
import radio from "@/ux-components/radio/radio";
|
||||||
|
|
@ -441,6 +450,7 @@ export default {
|
||||||
components: {
|
components: {
|
||||||
buttonPrimary,
|
buttonPrimary,
|
||||||
buttonSecondary,
|
buttonSecondary,
|
||||||
|
buttonBack,
|
||||||
radioCard,
|
radioCard,
|
||||||
listButton,
|
listButton,
|
||||||
radio,
|
radio,
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,7 @@ $h5-font-size: $font-size-base * 1.25;
|
||||||
$h6-font-size: $font-size-base * .875;
|
$h6-font-size: $font-size-base * .875;
|
||||||
|
|
||||||
//Border Radius
|
//Border Radius
|
||||||
|
// Helper classes are rounded, rounded-1, rounded-2, rounded-3
|
||||||
$border-radius: .25rem;
|
$border-radius: .25rem;
|
||||||
$border-radius-sm: .2rem;
|
$border-radius-sm: .2rem;
|
||||||
$border-radius-lg: .5rem;//Used for buttons. Can be used for other things, of course.
|
$border-radius-lg: .5rem;//Used for buttons. Can be used for other things, of course.
|
||||||
|
|
|
||||||
1
src/ux-components/button-back/button-back.spec.js
Normal file
1
src/ux-components/button-back/button-back.spec.js
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
test.todo("some test to be written in the future");
|
||||||
65
src/ux-components/button-back/button-back.vue
Normal file
65
src/ux-components/button-back/button-back.vue
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
<template>
|
||||||
|
<button class="back-button-wrapper d-flex p-0">
|
||||||
|
<div class="button-back">
|
||||||
|
<div class="arrow-left"></div>
|
||||||
|
<div class="box"></div>
|
||||||
|
</div>
|
||||||
|
</button>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "buttonBack"
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.back-button-wrapper {
|
||||||
|
border: none;
|
||||||
|
background: transparent;
|
||||||
|
.button-back {
|
||||||
|
display: inline-flex;
|
||||||
|
position: relative;
|
||||||
|
height: 18px;
|
||||||
|
width: 23px;
|
||||||
|
overflow: hidden;
|
||||||
|
.arrow-left {
|
||||||
|
position: absolute;
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
left: 4px;
|
||||||
|
background-color: $gray-550;
|
||||||
|
transform: rotate(45deg);
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
.box {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
background: $gray-550;
|
||||||
|
height: 100%;
|
||||||
|
width: 11px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
left: 12px;
|
||||||
|
border-radius: 5px;
|
||||||
|
&:before, &:after {
|
||||||
|
position: absolute;
|
||||||
|
left: 1px;
|
||||||
|
top: 3px;
|
||||||
|
content: " ";
|
||||||
|
height: 12px;
|
||||||
|
width: 2px;
|
||||||
|
background-color: $white;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
&:before {
|
||||||
|
transform: rotate(45deg);
|
||||||
|
}
|
||||||
|
&:after {
|
||||||
|
transform: rotate(-45deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
Reference in a new issue