Skip to content

Commit cb08aef

Browse files
committed
feat: add a new example
1 parent 5acca24 commit cb08aef

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

app/components/HeadlessToastWithProps.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ defineProps<{ message: string }>()
33
</script>
44

55
<template>
6-
<div v-html="message" />
6+
<div v-html="message" />
77
</template>

app/components/Others.vue

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,36 @@ toast.warning(markRaw(HeadlessToastWithProps), {
154154
}
155155
})
156156
}
157-
}
157+
},
158+
{
159+
name: 'Four Positions',
160+
snippet: `// Show toasts in both positions
161+
toast.success('Top Right', { position: 'top-right' })
162+
toast.success('Bottom Right', { position: 'bottom-right' })
163+
`,
164+
action: () => {
165+
toast.success('Top Right', {
166+
closeButton: true,
167+
position: 'top-right',
168+
duration: 30000
169+
})
170+
toast.success('Bottom Right', {
171+
closeButton: true,
172+
position: 'bottom-right',
173+
duration: 30000
174+
})
175+
toast.success('Top Left', {
176+
closeButton: true,
177+
position: 'top-left',
178+
duration: 30000
179+
})
180+
toast.success('Bottom Left', {
181+
closeButton: true,
182+
position: 'bottom-left',
183+
duration: 30000
184+
})
185+
}
186+
},
158187
]
159188
160189
const activeType = ref(allTypes[0])

0 commit comments

Comments
 (0)