0.1.1 • Published 11 months ago

vue-message-viewer v0.1.1

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

Vue Message Viewer

Introduction

This is a simple and effective Vue 3 and TypeScript based library for displaying different types of messages. It currently supports the following types of messages:

  • Email
  • Viber
  • SMS

Installation

To install this library, you can use the following command:

npm i vue-message-viewer

Usage

To use this library, you need to import the MessageViewer component and pass the message object to it.

<script setup lang="ts">
import { ref } from 'vue';
import { MessageViewer } from 'vue-message-viewer';
import type { Message, MessageType } from 'vue-message-viewer';

const message = ref<Message>({
    type: 'SMS';
    sender: '';
    body: '';
    date: new Date();
    title: '';
    htmlUrl: '';
});
</script>

<template>
  <MessageViewer :message="message" />
</template>

Props

NameTypeRequiredDefaultDescription
messageMessagetrue-The message object that will be displayed.

Message Object

The message object is a simple object that contains the following properties:

NameTypeRequiredDefaultDescription
typeMessageTypetrue-The type of the message. Can be one of the following: SMS, Email, Viber
0.1.1

11 months ago

0.1.0

11 months ago

0.0.2

12 months ago