1.1.3 • Published 3 years ago

awesome-pay v1.1.3

Weekly downloads
-
License
-
Repository
github
Last release
3 years ago

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

npm.io
LeeAhHyun
1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago