vuetify-vuejs-firebase-card-media

0.0.6 • Public • Published

vuetify-vuejs-firebase-card-media

npm version

A cover component with linked with your Firebase Storage project.

preview.png

Installation

npm install vuetify-vuejs-firebase-card-media --save

Quick Usage

<template>
  <firebaseCardMedia
    path="YOUR/FOLDER/"
    :storage="getStorage()"
    previewImage="http://…"
    targetFileName="image.png"
    :limitToType="['image/png']"
    @onFileUpload="onUpload"
    @onFileDelete="onDelete"
    @onFileUploadError="onUploadError"
  />
</template>
 
<script>
  import Vue from 'vue';
  import firebaseCardMedia from 'vuetify-vuejs-firebase-card-media';
  Vue.use(firebaseCardMedia);
 
  export default {
    name: 'event',
    getStorage: function(){
      return firebase.storage();
    },
    onUpload: function(path){
      console.log(path);
    },
    onDelete: function(path){
      console.log(path);
    },
    onDelete: function(path){
      console.log(path);
    }
  }
</script>

Full parameters usage

<template>
  <firebaseCardMedia
    path="YOUR/FOLDER/"
    :storage="getStorage()"
    previewImage="http://…"
    coverSize="200px"
    targetFileName="image.png"
    createBtnLabel="Choose the cover"
    modifyBtnLabel="Modify the cover"
    unsuportedMediaTypeLabel="Invalide file format"
    :limitToType="['image/png']"
    @onFileUpload="onUpload"
    @onFileDelete="onDelete"
    @onFileUploadError="onUploadError"
  />
</template>
 
<script>
  import Vue from 'vue';
  import firebaseCardMedia from 'vuetify-vuejs-firebase-card-media';
  Vue.use(firebaseCardMedia);
 
  export default {
    name: 'event',
    getStorage: function(){
      return firebase.storage();
    },
    onUpload: function(path){
      console.log(path);
    },
    onDelete: function(path){
      console.log(path);
    },
    onDelete: function(path){
      console.log(path);
    }
  }
</script>

Package Sidebar

Install

npm i vuetify-vuejs-firebase-card-media

Weekly Downloads

1

Version

0.0.6

License

MIT

Unpacked Size

722 kB

Total Files

10

Last publish

Collaborators

  • vbrosseau