[WIP] Добавил переход на главную страницу при клике на иконку, заменил иконку уведомления об ошибке, поправил стили

This commit is contained in:
megavrilinvv
2023-03-02 18:06:24 +03:00
parent 943454c091
commit 486bfdf9c1
5 changed files with 38 additions and 3 deletions

View File

@@ -2,7 +2,12 @@
.notification-container.flex.justify-between(:style="{ backgroundColor: bgColor }")
.notification-content.flex.mr-16
.grid(:class="{'grid-rows': message}")
.text-white.text-xs.icon.row-span-full.flex.justify-center.items-center(:class="iconClass")
.text-white.text-xs.icon.row-span-full.flex.justify-center.items-center(
v-if="this.type !== 'error'",
:class="iconClass"
)
.error.text-xs.row-span-full.flex.justify-center.items-center(v-else)
img(:src="errorIcon")
.text-white.text-base.font-black(v-if="title") {{ title }}
.text-white.text-base.font-semibold(v-if="message") {{ message }}
.icon-cancel.cursor-pointer.text-white.opacity-50.text-sm(class="hover:opacity-100 active:opacity-75", @click="delNotification")
@@ -10,6 +15,7 @@
<script>
import { deleteNotification } from "@/components/Notifications/notificationContext";
import errorIcon from "@/assets/icons/error.svg";
export default {
name: "NotificationItem",
@@ -23,6 +29,7 @@ export default {
data() {
return {
timerId: 0,
errorIcon,
};
},
computed: {
@@ -73,6 +80,7 @@ export default {
border-radius: 5px
width: 100%
left: 0
.icon
border-radius: 50%
border: 1.5px solid white
@@ -80,9 +88,16 @@ export default {
line-height: 10px
width: 24px
height: 24px
.error
border-radius: 50%
width: 24px
height: 24px
.grid
grid-template-columns: 24px 1fr
grid-column-gap: 8px
.grid-rows
grid-template-rows: repeat(2, auto)
grid-row-gap: 8px