1.0.0 • Published 4 years ago

vue-online-indicator v1.0.0

Weekly downloads
1
License
ISC
Repository
github
Last release
4 years ago

vue-online-indicator

Installation

npm install vue-online-indicator

Add it to your project

import onlineIndicator from 'vue-online-indicator'

Vue.use(onlineIndicator)

Basic usage example

<template>
    <vue-online-indicator
        :timeout="2500"
        position="top-left"
        spanClass="online-indicator-text"
        class="online-indicator-wrapper"
        @online="doStuffOnline()"
        @offline="doStuffOffline()"

     />
</template>

Props

NameTypeRequired?DefaultDescription
positionStringNo'top-right''top-right/left/center', 'bottom-right/left/center/
timeoutNumberNo'3500'time to dismiss notification. Set to 0 to keep it.
stylesObjectNo'{}'Styling the div wrapping element.
spanStylesObjectNo'{}'Styling the span element inside notification bar .
classStringNo''Class name for div wrapping element .
spanClassStringNo''Class name for span element inside notification bar.