NuxtN
Nuxt7mo ago
15 replies
Mads

Add content to UModal with useOverlay()

So I am using UModal with useOverlay() from Nuxt UI.

I'd like to be able to pass in some content to the modal, but how does this work?

modal.patch({
title: 'Vi har hentet data fra XXX',
body: <ul class="space-y-2 list-disc list-inside text-sm">${updatedValues.map(value => <li>${value}</li>).join('')}</ul>,
footer: {
actions: [
{
label: 'Luk',
onClick: () => modal.close(),
},
],
},
})
Was this page helpful?