vue-function-snackbar

0.1.1 • Public • Published

vue-function-snackbar

A snackbar component based on vue-function-api

Usage

<template>
  <div class="your-app>
    <Snackbar :show="showSnackbar" @hide="handleHide" @click="handleClick">Hello World</Snackbar>
  </div>
</template>
 
<script>
import { value } from 'vue-function-api'
import Snackbar from 'vue-function-snackbar'
 
export default {
  name: 'YourApp',
 
  setup() {
    const showSnackbar = value(false)
 
    return {
      showSnackbar,
 
      handleHide() {
 
      },
 
      handleClick() {
 
      },
    }
  },
 
  components: {
    Snackbar,
  },
}
</script>
 
<style scoped>
  .your-app {
    /* You can custom the z-index of vue-snackbar by CSS variable, default is 100 */
    --vue-snackbar-z-index: 1000;
  }
</style>

Package Sidebar

Install

npm i vue-function-snackbar

Weekly Downloads

1

Version

0.1.1

License

none

Unpacked Size

2.27 kB

Total Files

4

Last publish

Collaborators

  • zhiquan_yu