buttons
Description
Optional. An array of buttons for a modal boxUsage
buttons?: string[];
Default value
["cancel", "ok"]
Example
<script setup>
import { ref } from "vue";
import { Modal, Text, Portal, Button } from "@svar-ui/vue-core";
const custom1 = ref(false);
function hideAll() {
custom1.value = false;
}
</script>
<template>
<Portal v-if="custom1">
<Modal title="Custom Prompt" :onconfirm="hideAll" :buttons="['ok']">
<Text :select="true" :focus="true" value="Some" />
</Modal>
</Portal>
</template>
Related article: Providing the buttons functionality
Related sample: Messages