mirror of
https://github.com/KevinMidboe/vue-js-modal.git
synced 2025-10-29 18:00:20 +00:00
Updated README with "top-right" slot example (#16)
This commit is contained in:
22
README.md
22
README.md
@@ -105,6 +105,28 @@ export default {
|
||||
This example, initializes `time` variable every time the modal is being opened.
|
||||
And then forbits closing it for the next 5000 ms
|
||||
|
||||
### Other
|
||||
|
||||
#### Close button
|
||||
If you want to have a Close (x) button in the top-right corner, you can use "top-right" slot for it. There is deliberately no predefined Close button style - you will have to implement/use your own button.
|
||||
|
||||
Example:
|
||||
```vue
|
||||
<template>
|
||||
<modal name="foo">
|
||||
|
||||
<div slot="top-right">
|
||||
<button @click="$modal.hide('foo')">
|
||||
x
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Hello, world!
|
||||
|
||||
</modal>
|
||||
</template>
|
||||
```
|
||||
|
||||
### Developers
|
||||
|
||||
To run an example:
|
||||
|
||||
Reference in New Issue
Block a user