antoniandre / wave-ui

A UI framework for Vue.js 3 (and 2) with only the bright side. ☀️
https://antoniandre.github.io/wave-ui
MIT License
546 stars 41 forks source link

No documentation for templates #92

Closed llamicron closed 2 years ago

llamicron commented 2 years ago

I'm new to this framework so forgive me if I'm just missing something. In the code for a dialog, templates are used like this:

<template #title>
    <!-- more content here -->
</template>

I can't seem to find any documentation about this template or what templates are available. Are the docs for this just not written yet, or am I missing something? Thanks for any help you can provide.

antoniandre commented 2 years ago

Hi @llamicron, The documentation is complete. To use a w-dialog you just need the <w-dialog> tag with inside it (before the closing tag), whatever free content you want, and with html if you want. That will be the content of the dialog. If you want a title to this dialog, you can use the prestyled #title slot, that’s what <template #title> is for but not mandatory.

in the documentation, the examples are presented first and bellow you can find the potential slots available if there are for this component.

If you are not familiar with slots, you should read about it in the vue documentation to understand more the concept.

Also on each example, you can edit in codepen, so you can test what is the minimum markup needed.

Hope it helps :)

antoniandre commented 2 years ago

Closed due to inactivity. please reopen if not solved.

llamicron commented 2 years ago

Ah, I see. I didn't know those were called slots, I think I've been using those in a different way. Thanks!