0.0.5 • Published 4 years ago

dgtek-popup v0.0.5

Weekly downloads
12
License
-
Repository
github
Last release
4 years ago

dgtek-popup

This component is designed to be utilized in dgtek.net projects only.

It should not be used outside the dgtek.net and landing pages of dgtek.net

Install the component

yarn add dgtek-popup

Add with script tag

(Not recommended)
<script src="https://registry.npmjs.org/dgtek-popup"></script>

Import the component and it's styles

It'll be the global component Popup
import 'dgtek-popup'
import 'dgtek-popup/dist/dgtek-popup.css'

Node.js

const Popup = require('dgtek-popup')
const PopupStyles = require('dgtek-popup/dist/dgtek-popup.css')

Usage

Success (form has been submitted)
<Popup type="success" :opened="popupOpened" />
Error (contact form error)
<Popup type="error" :opened="popupOpened" />
Disabled (contact form submission is disabled)
<Popup type="disabled" :opened="popupOpened" />
Any other message

You can send any info to component Popup through the prop data

<Popup :data="popupContent" :opened="popupOpened" />

where

popupContent: {
  header: '...',
  color: '#000',
  text: '...'
}