@cc-test2/modal
v1.0.9
Published
Made with create-react-library
Downloads
1
Readme
modal
Made with create-react-library
Install
npm install --save @cc-test2/modal
Usage
import React, { Component } from 'react'
import {Button, Text, useDisclosure} from "@chakra-ui/core";
import Modal from "@cc-test2/modal";
const ExampleComponent = () => {
const {isOpen, onOpen, onClose} = useDisclosure();
return (
<>
<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}/>
</>)
}
License
MIT © CodeCraft