@codecraftkit/modal
v1.0.5
Published
Made with create-react-library
Downloads
22
Readme
modal
Made with create-react-library
Install
npm install --save @codecraftkit/modal
Usage
import React, { Component } from 'react'
import {Button, Text, useDisclosure} from "@chakra-ui/core";
import Modal from "@codecraftkit/modal";
const ExampleComponent = () => {
const {isOpen, onOpen, onClose} = useDisclosure();
return (
<Fragment>
<Button size='xs' onClick={onOpen}>Open Modal</Button>
<Modal
title='Modal Title'
buttonText='New'
body={<Text>Text Inside the Modal body</Text>}
closeOnOverlayClick={false}
onOpen={onOpen}
isOpen={isOpen}
onClose={onClose}/>
</Fragment>)
}
License
MIT © CodeCraft