@@ -76,7 +76,7 @@ Use `toast.show()` method to generate your toasts. The method accepts the follow
76
76
77
77
## Variants
78
78
79
- Toasts can be displayed as variants thru various helper methods or be set in ` ToastOptions.varaint `
79
+ Toasts can be displayed as variants thru various helper methods or be set in ` ToastOptions.variant `
80
80
81
81
``` html
82
82
<b-container
@@ -96,16 +96,25 @@ Toasts can be displayed as variants thru various helper methods or be set in `To
96
96
import {useToast } from ' bootstrap-vue-3'
97
97
let toast = useToast ()
98
98
let variantshow1 = () => {
99
- toast .danger ({title: ' Item Deleted' }, {pos: ' bottom-center' })
99
+ toast .show ({title: ' Item Deleted' }, {pos: ' bottom-center' , variant : ' danger ' })
100
100
}
101
101
let variantshow2 = () => {
102
- toast .info ({title: ' New Message' , body: ' This is a toast' }, {pos: ' bottom-right' })
102
+ toast .show (
103
+ {title: ' New Message' , body: ' This is a toast' },
104
+ {pos: ' bottom-right' , variant: ' info' }
105
+ )
103
106
}
104
107
let variantshow3 = () => {
105
- toast .warning ({title: ' Warning for Item' , body: ' Please check list' }, {pos: ' bottom-right' })
108
+ toast .show (
109
+ {title: ' Warning for Item' , body: ' Please check list' },
110
+ {pos: ' bottom-right' , variant: ' warning' }
111
+ )
106
112
}
107
113
let variantshow4 = () => {
108
- toast .success ({title: ' Event Created!' , body: ' Bootstrap Event' }, {pos: ' bottom-right' })
114
+ toast .show (
115
+ {title: ' Event Created!' , body: ' Bootstrap Event' },
116
+ {pos: ' bottom-right' , variant: ' success' }
117
+ )
109
118
}
110
119
</script >
111
120
```
@@ -128,17 +137,17 @@ Toasts can be displayed as variants thru various helper methods or be set in `To
128
137
<ClientOnly >
129
138
130
139
<script lang =' ts ' setup >
131
- import {ref , computed } from ' vue'
132
- import {useToast } from ' bootstrap-vue-3'
140
+ import {ref , computed } from ' vue' ;
141
+ import {useToast } from ' bootstrap-vue-3' ;
133
142
134
143
135
- let show1 = () => {toast .show ({title: ' example title' })}
136
- let show2 = () => {toast .info ({title: ' example title' , body: " This is a toast" })}
144
+ let show1 = () => {toast .show ({title: ' example title' })};
145
+ let show2 = () => {toast .show ({title: ' example title' , body: " This is a toast" }, {variant : ' info ' })};
137
146
138
- let variantshow1 = () => {toast .danger ({title: ' Item Deleted' }, {pos: ' bottom-center' })}
139
- let variantshow2 = () => {toast .info ({title: ' New Message' , body: " This is a toast" }, {pos: ' bottom-right' })}
140
- let variantshow3 = () => {toast .warning ({title: ' Warning for Item' , body: " Please check list" },{pos: ' bottom-right' })}
141
- let variantshow4 = () => {toast .success ({title: ' Event Created!' , body: " Bootstrap Event" },{pos: ' bottom-right' })}
147
+ let variantshow1 = () => {toast .show ({title: ' Item Deleted' }, {pos: ' bottom-center' , variant : ' danger ' })};
148
+ let variantshow2 = () => {toast .show ({title: ' New Message' , body: " This is a toast" }, {pos: ' bottom-right' , variant : ' info ' })};
149
+ let variantshow3 = () => {toast .show ({title: ' Warning for Item' , body: " Please check list" },{pos: ' bottom-right' , variant : ' warning ' })};
150
+ let variantshow4 = () => {toast .show ({title: ' Event Created!' , body: " Bootstrap Event" },{pos: ' bottom-right' , variant : ' success ' })};
142
151
</script >
143
152
144
153
</ClientOnly >
0 commit comments