1.1.0 • Published 1 year ago

@astrum-ui/modal v1.1.0

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

@astrum-ui/modal

Introducing Astrum-UI/Modal: A versatile React component for creating sleek and customizable modal overlays effortlessly.

Installation

npm install --save @astrum-ui/modal

or access the complete suite of components

npm install --save @astrum-ui/core

Usage

import Modal from @astrum-ui/modal
import { useState } from 'react'

export default function HelloModal() {
 const [show, setShow] = useState(false)

 return (
  <>
	 <Modal show={show} setShow={setShow} >
          <h2>Hello world heading</h2>
	  <div>Hello world content</div>
	 </Modal>

	 <button type="button" onClick={() => setShow(true)} >
		Show Modal
	 </button>
  </>
 )
}

Note : h2 must be the direct children of Modal to be the heading of modal

More examples

Props

Here's a list of all the props available to customize this modal according to your need

* for required - for any value of specified type

1.1.0

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago