Skip to content

Commit 95a380d

Browse files
committed
Fix examples with correct code
1 parent 73f9cdc commit 95a380d

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

docs/components/Toast.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,25 @@ Toasts can be displayed as variants thru various helper methods or be set in `To
9696
import {useToast} from 'bootstrap-vue-3'
9797
let toast = useToast()
9898
let variantshow1 = () => {
99-
toast.danger({title: 'Item Deleted'}, {pos: 'bottom-center'})
99+
toast.show({title: 'Item Deleted'}, {pos: 'bottom-center', variant: 'danger'})
100100
}
101101
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+
)
103106
}
104107
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+
)
106112
}
107113
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+
)
109118
}
110119
</script>
111120
```

0 commit comments

Comments
 (0)