0.0.2 • Published 6 months ago

vulture-modal-react v0.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
6 months ago

Vulture-modal

Built with JavaScript

vulture-modal-react

Vulture-modal is a minimalist and easy-to-use modal plugin

Demo

It is still under development.

Features

  • Multiple Modals
  • Customizable (write your custom html in content)

Installation

  • Run the below command to add Vulture-modal to your exisitng or new project.
npm i vulture-modal-react

or

yarn add vulture-modal-react
  • Import Vulture-modal into your module to start using it.
import { VultureModal } from 'vulture-modal-react'
import 'vulture-modal-react/dist/style.css'

If you are not using any framework, you can use our vulture-modal library.

Documentation

You can use vulture modal with parameters like this.

<VultureModal />

or you can totaly customizable vulture modal

<VultureModal>
  <div>customizable Modal</div>
</VultureModal>

API

Option KeytypeUsageDefaults
showbooleanShows or hides the modalfalse
position"center", "left", "right"To show the modal on center or left or right"center"
headerTextstringText to be displayed on the modal"🎉 Vulture Modal"
contentstring HTML ElementText or html element to be displayed in the content"🦅 Vulture Content"
footerbooleanTo show the confirm and cancel button under the modaltrue
confirmButtonTextstringChange your confirm button text (Only if footer is true)"Confirm"
cancelButtonTextstringChange your cancel button text (Only if footer is true)"Cancel"
onConfirmFunctionIt works when the confirm button is pressed in the footer
onCancelFunctionIt works when the cancel button is pressed in the footer
onCloseFunctionIt works when the close icon is pressed in the header

License

ISC © Selim Hamzaoğulları