awesome-pay
v1.1.3
Published
React Awesome Pay
Downloads
20
Readme
Awesome Pay
This is a virtual payment module made from react.
🌈 Install
npm install awesome-pay
🌈 Usage
Setting
public/index.html
<body>
...
<div id="modal"></div>
...
</body>
Use
import { PayModal } from 'awesome-pay';
export default function Component({ totalPrice }) {
const [showModal, setShowModal] = useState(false);
const toggleShowModal = () => {
setShowModal(prevState => !prevState);
};
const paymentFunc = () => {
toggleShowModal();
// Do Something What You Want
};
return (
<div>
...
<PayModal
showModal={showModal}
toggleShowModal={toggleShowModal}
companyName={companyName}
totalPrice={totalPrice}
paymentFunc={paymentFunc}
/>
...
</div>
);
}
🌈 Author
| | | :------------------------------------------: | | LeeAhHyun |