0.0.2 • Published 2 years ago

@michael-chiang-dev5/lib-vue-custom-background v0.0.2

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Description

A vue component for a button that allows the user to select an image. Returns the image as a base64 string.

Usage

import { SetBackgroundButton } from '@michael-chiang-dev5/lib-vue-custom-background'

Props

idStr - a string that can be used to style the button via css classStr - a string that can be used to style the button via css

Emits

update - passes the image as a base64 string

Example

<template>
  <div :style="{ backgroundImage: `url(${backgroundImageData})`, width: '800px', height: '600px' }">
  </div>
  <SetBackgroundButton @update="(image64) => backgroundImageData = image64">Click me</SetBackgroundButton>
</template>

<script setup>
import {  ref } from 'vue'
import { SetBackgroundButton } from '@michael-chiang-dev5/lib-vue-custom-background'

const backgroundImageData = ref(null)

</script>
0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago