Skip to content

Commit 7998d31

Browse files
committed
fix: CToast class change
1 parent 5b62c61 commit 7998d31

File tree

4 files changed

+8
-17
lines changed

4 files changed

+8
-17
lines changed

src/components/toast/CToast.vue

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ export default {
7171
return [
7272
'toast',
7373
{
74-
'd-none': !this.isShowed && !this.hidding,
75-
'full': this.props.position.includes('full'),
74+
'show': this.isShowed || this.hidding,
75+
'toast-full': this.props.position.includes('full'),
7676
}
7777
]
7878
},
@@ -152,15 +152,6 @@ export default {
152152
</script>
153153

154154
<style scoped>
155-
.toast {
156-
opacity: 1;
157-
}
158-
.toast.full {
159-
max-width: 100%;
160-
}
161-
.toast:last-child {
162-
margin-bottom: 0.75rem;
163-
}
164155
.fade-enter-active {
165156
transition: opacity .5s;
166157
}

src/components/toast/CToaster.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default {
3030
toasterClasses () {
3131
return [
3232
'toaster',
33-
{ 'd-flex flex-column-reverse': this.reverse }
33+
{ 'toaster-reverse': !this.reverse }
3434
]
3535
}
3636
}

src/components/toast/tests/__snapshots__/CToast.spec.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ exports[`CToast renders correctly 1`] = `
55
appear=""
66
aria-atomic="true"
77
aria-live="assertive"
8-
class="toast"
8+
class="toast show"
99
role="alert"
1010
style=""
1111
>
@@ -22,7 +22,7 @@ exports[`CToast renders correctly custom wrapper 1`] = `
2222
appear=""
2323
aria-atomic="true"
2424
aria-live="assertive"
25-
class="toast"
25+
class="toast show"
2626
name="fade"
2727
role="alert"
2828
style="z-index: 1100; min-width: 350px; position: fixed; bottom: 0px; left: 50%; transform: translateX(-50%);"

src/components/toast/tests/__snapshots__/CToaster.spec.js.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22

33
exports[`CToaster renders correctly 1`] = `
44
<div
5-
class="toaster d-flex flex-column-reverse"
5+
class="toaster"
66
style="z-index: 1100; min-width: 350px; position: fixed; top: 0px; right: 0px;"
77
/>
88
`;
99

1010
exports[`CToaster renders correctly custom wrapper 1`] = `
1111
<div
12-
class="toaster d-flex flex-column-reverse"
12+
class="toaster"
1313
style="z-index: 1100; min-width: 350px; position: fixed; top: 0px; left: 0px;"
1414
>
1515
<div
1616
appear=""
1717
aria-atomic="true"
1818
aria-live="assertive"
19-
class="toast"
19+
class="toast show"
2020
role="alert"
2121
style=""
2222
>

0 commit comments

Comments
 (0)