WIP - alerts component
This commit is contained in:
parent
b297a9422b
commit
7d100b652b
4 changed files with 54 additions and 1 deletions
|
|
@ -112,6 +112,22 @@
|
|||
<h6>h6 Heading</h6>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row my-2">
|
||||
<div class="col">
|
||||
<!--
|
||||
Available classes for alertClass:
|
||||
alert-sucess (green)
|
||||
alert-dander (red)
|
||||
alert-warning (yellow)
|
||||
alert-info (blue)
|
||||
-->
|
||||
<alert
|
||||
alertClass="alert-info"
|
||||
alertHeading="Alert Heading"
|
||||
alertText="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -121,6 +137,7 @@ import buttonSecondary from "@/uxComponents/buttonSecondary/buttonSecondary";
|
|||
import radioCard from "@/uxComponents/radioCard/radioCard";
|
||||
import listButton from "@/uxComponents/listButton/listButton";
|
||||
import radioList from "@/uxComponents/radioList/radioList";
|
||||
import alert from "@/uxComponents/alert/alert";
|
||||
export default {
|
||||
name: "App",
|
||||
components: {
|
||||
|
|
@ -128,7 +145,8 @@ export default {
|
|||
buttonSecondary,
|
||||
radioCard,
|
||||
listButton,
|
||||
radioList
|
||||
radioList,
|
||||
alert
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -163,3 +163,8 @@ $box-shadow: 0 .5rem 1rem rgba($black, .15);
|
|||
$box-shadow-sm: 0 .125rem .25rem rgba($black, .075);
|
||||
$box-shadow-lg: 0 1rem 3rem rgba($black, .25);//Safelite default
|
||||
$box-shadow-inset: inset 0 1px 2px rgba($black, .075);
|
||||
|
||||
|
||||
$alert-bg-scale: -90%;
|
||||
$alert-border-scale: -100%;
|
||||
$alert-color-scale: 40%;
|
||||
|
|
|
|||
1
src/uxComponents/alert/alert.spec.js
Normal file
1
src/uxComponents/alert/alert.spec.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
test.todo('some test to be written in the future');
|
||||
29
src/uxComponents/alert/alert.vue
Normal file
29
src/uxComponents/alert/alert.vue
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<template>
|
||||
<div class="alert fade show text-center" role="alert"
|
||||
v-bind:isDismissable="isDismissable"
|
||||
v-bind:class="[isDismissable ? 'alert-dismissible' : '', this.alertClass]"
|
||||
>
|
||||
<strong>{{alertHeading}}</strong>
|
||||
<p class="m-0 text-body">{{alertText}}</p>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"
|
||||
v-bind:class="[isClose ? '' : 'visually-hidden']"
|
||||
></button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "alert",
|
||||
props: {
|
||||
alertHeading: String,
|
||||
alertText: String,
|
||||
alertClass: String
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isDismissable: true,
|
||||
isClose: true
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Loading…
Reference in a new issue