0.1.4 • Published 5 years ago

vue-ustmodal v0.1.4

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

vue-ustmodal

Version Travis (.org) Downloads/week License npm collaborators

Intro

vue-ustmodal is a modal that can be used in your components without thinking about stylings or modal behaviour.

npm.io

Getting Started

Installation

  • with NPM

    $ npm install -save vue-ustmodal

  • with Yarn

    $ yarn add vue-ustmodal

Usage

Example

main.js

import Vue from 'vue'
import App from './App.vue'
import ustModal from "vue-ustmodal";

Vue.config.productionTip = false
Vue.use(ustModal);

new Vue({
  render: h => h(App),
}).$mount('#app')

Component.vue

<template>
<div>
    <div class="modal">
        <button @click="modal = true">Open</button>
        
        <ustModal v-model="modal" :styles="styles"> 
            <h3 slot="title">Custom Header</h3>
            <div slot="body">
                <p>This Modal Body</p>
                <p>This Modal Body</p>
                <p>This Modal Body</p>
                <p>This Modal Body</p>
                <p>This Modal Body</p>
            </div>
            <div slot="actions">
                <button @click="modal=false">Cancel</button>
                <button @click="modal=false">OK</button>
            </div>
        </ustModal>
    </div>
</div>
</template>

<script>
import ustModal from './ustModal'
export default {
    components: {
        ustModal
    },
    data: () =>  ({
        modal: true,
        styles: {
            width: "500px"
        }
    })
}
</script>

Contributing

Feel free to contribute to the Open Source NPM Package Template. If you want to contribute.

License

The Open Source NPM Package Template is licensed under the Attribution-NonCommercial-ShareAlike 4.0 International License.

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago