1.0.3 • Published 8 months ago

vue-dialog-library v1.0.3

Weekly downloads
-
License
-
Repository
-
Last release
8 months ago

Vue dialogs library

It allows you to call the dialog from code like window.alert() and wait for user's answer.

  • Vue3 based component.

Instalation

npm

npm install vue-dialog-library

Usage

You can use it locally.

Locally

  • component.vue
import "vue-dialog-library/dist/styles.css";
import { AlertDialog } from "vue-dialog-library";


const alertDialogRef = ref<InstanceType<typeof AlertDialog>>();

const showCustomAlert = async (): Promise<void> => {
  // Your code
  const result = await alertDialogRef.value?.show(
    "Ooops, something went wrong!"
  );
  // Your code
};
<template>
  <AlertDialog :title="'ok'" ref="alertDialogRef" />
</template>

Props

  • Alert dialog
NameTypeDefaultDescription
titleStringAlertTitle on the top side of dialog
btnOkTextStringOKText on button
  • Confirm dialog
NameTypeDefaultDescription
titleStringConfirmTitle on the top side of dialog
btnOkTextStringConfirmText on button
btnCancelTextStringCancelText on button
alertBooleanfalseStyling property
1.0.3

8 months ago

1.0.2

8 months ago

1.0.1

10 months ago

1.0.0

10 months ago