diff --git a/src/assets/img/icons/close.svg b/src/assets/img/icons/close.svg new file mode 100644 index 000000000..e660dc6b8 --- /dev/null +++ b/src/assets/img/icons/close.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/layouts/componentTest/componentTest.vue b/src/layouts/componentTest/componentTest.vue index 90d281d67..01f15ff55 100644 --- a/src/layouts/componentTest/componentTest.vue +++ b/src/layouts/componentTest/componentTest.vue @@ -112,6 +112,22 @@
h6 Heading
+
+
+ + +
+
@@ -131,6 +147,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: { @@ -138,7 +155,8 @@ export default { buttonSecondary, radioCard, listButton, - radioList + radioList, + alert }, data() { return { diff --git a/src/styles/commonAlertStyles.scss b/src/styles/commonAlertStyles.scss new file mode 100644 index 000000000..28e924d93 --- /dev/null +++ b/src/styles/commonAlertStyles.scss @@ -0,0 +1,47 @@ + +.alert { + button { + display: none; + } + .btn-close { + background: none; + opacity: 1; + } + &.alert-dismissible { + button { + display: flex; + } + } + &.alert-info { + .alert-heading { + color: $blue-700; + } + svg { + fill: $blue-700; + } + } + &.alert-danger { + .alert-heading { + color: $red-700; + } + svg { + fill: $red-700; + } + } + &.alert-warning { + .alert-heading { + color: $yellow-700; + } + svg { + fill: $yellow-700; + } + } + &.alert-success { + .alert-heading { + color: $green-700; + } + svg { + fill: $green-700; + } + } +} diff --git a/src/styles/uxVariables.scss b/src/styles/uxVariables.scss index 31ad10d5d..7998b7a87 100644 --- a/src/styles/uxVariables.scss +++ b/src/styles/uxVariables.scss @@ -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); + +//Alerts +$alert-bg-scale: -90%; +$alert-border-scale: -100%; +$alert-color-scale: 40%; diff --git a/src/uxComponents/alert/alert.spec.js b/src/uxComponents/alert/alert.spec.js new file mode 100644 index 000000000..882a68129 --- /dev/null +++ b/src/uxComponents/alert/alert.spec.js @@ -0,0 +1 @@ +test.todo('some test to be written in the future'); \ No newline at end of file diff --git a/src/uxComponents/alert/alert.vue b/src/uxComponents/alert/alert.vue new file mode 100644 index 000000000..8e50fd5ca --- /dev/null +++ b/src/uxComponents/alert/alert.vue @@ -0,0 +1,30 @@ + + + diff --git a/vue.config.js b/vue.config.js index bda41b2dd..ba8d382a1 100644 --- a/vue.config.js +++ b/vue.config.js @@ -27,6 +27,7 @@ module.exports = { @import "@/styles/commonRadioStyles.scss"; @import "@/styles/commonTypographyStyles.scss"; @import "@/styles/commonComponentStyles/ymmsCommonStyles.scss"; + @import "@/styles/commonAlertStyles.scss"; ` } } diff --git a/vue.release.config.js b/vue.release.config.js index 5bc60309f..296d833c5 100644 --- a/vue.release.config.js +++ b/vue.release.config.js @@ -17,6 +17,7 @@ module.exports = { @import "@/styles/commonRadioStyles.scss"; @import "@/styles/commonTypographyStyles.scss"; @import "@/styles/commonComponentStyles/ymmsCommonStyles.scss"; + @import "@/styles/commonAlertStyles.scss"; ` } }