@codecraftkit/alert
v1.0.4
Published
Made with create-react-library
Downloads
11
Readme
alert
Made with create-react-library
Install
npm install --save @codecraftkit/alert
Usage
import React, { Component } from 'react'
import Alert from '@codecraftkit/alert'
const AlertComponent = () => {
const {isOpen, onOpen, onClose} = useDisclosure();
return (
<Fragment>
<Button size='xs' onClick={onOpen}>Open Alert</Button>
<Alert
title='Delete Access'
body="Are you sure? You can't undo this action afterwards."
isOpen={isOpen}
onClose={onClose}
handleAction={()=>alert("Hello")}/>
</Fragment>))
}
License
MIT © CodeCraft