Skip to content

Commit f3733fc

Browse files
committed
fix(style): add dismiss button background crop
1 parent 9504bc7 commit f3733fc

File tree

1 file changed

+33
-11
lines changed

1 file changed

+33
-11
lines changed

src/views/Notification/Items/BaseItem.vue

+33-11
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,43 @@ defineEmits<{
77
</script>
88

99
<template>
10-
<Card>
11-
<h2 v-if="$slots.title" class="titleWrapper">
12-
<slot name="title"></slot>
13-
</h2>
14-
<div v-if="$slots.text" class="textWrapper">
15-
<slot name="text"></slot>
16-
</div>
17-
<div v-if="$slots.actions" class="actionsWrapper">
18-
<slot name="actions"></slot>
19-
</div>
10+
<Card class="transparent">
2011
<button class="dismissButton" @click="$emit('dismiss')">X</button>
12+
13+
<div class="background">
14+
<h2 v-if="$slots.title" class="titleWrapper">
15+
<slot name="title"></slot>
16+
</h2>
17+
<div v-if="$slots.text" class="textWrapper">
18+
<slot name="text"></slot>
19+
</div>
20+
<div v-if="$slots.actions" class="actionsWrapper">
21+
<slot name="actions"></slot>
22+
</div>
23+
</div>
2124
</Card>
2225
</template>
2326

2427
<style lang="scss" scoped>
28+
.transparent {
29+
background-color: transparent;
30+
padding: 0;
31+
}
32+
33+
.background {
34+
padding: 1rem;
35+
background-color: white;
36+
-webkit-mask: radial-gradient(circle 17px at top 0+6px right 0+6px, #0000 98%, blue);
37+
border-radius: 16px;
38+
}
39+
2540
.dismissButton {
2641
position: absolute;
2742
top: -6px;
2843
right: -6px;
2944
border-radius: 50%;
3045
color: black;
3146
background-color: white;
32-
outline: 2px solid black;
3347
vertical-align: center;
3448
text-align: center;
3549
width: 24px;
@@ -38,6 +52,14 @@ defineEmits<{
3852
&:hover {
3953
background-color: lightgray;
4054
}
55+
56+
&:active {
57+
background-color: darkgray;
58+
}
59+
60+
-webkit-box-shadow: 0 0 16px 0 rgba(50, 50, 50, 0.75);
61+
-moz-box-shadow: 0 0 16px 0 rgba(50, 50, 50, 0.75);
62+
box-shadow: 0 0 16px 0 rgba(50, 50, 50, 0.75);
4163
}
4264
4365
.titleWrapper {

0 commit comments

Comments
 (0)