1.4.6 • Published 3 years ago

@kiwook/modal v1.4.6

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

React Modal

propstype설명
messagestring모달의 메시지 입니다.
closingButtonTextstring닫는 버튼의 텍스트 입니다.
onClosefunction닫는 버튼의 로직이 들어갑니다.
handleButtonTextstring삭제, 로그아웃 등 어떤 특정한 일을 하는 버튼의 텍스트입니다.
onHandlefunction어떤 특정한 일을 수행하는 로직이 들어갑니다.
propstypedescription
messagestringA modal message is entered.
closingButtonTextstringThe text of the close button.
onClosefunctionThe logic of the closing button enters.
handleButtonTextstringThe text of the button that does some specific thing, such as delete, logout, etc.
onHandlefunctionLogic goes in to do some specific thing.

example

import React, { useState } from 'react';
import { Modal } from '@kiwook/modal'

const App = () => {
  const [isOpenModal, setIsOpenModal] = useState(false)

  const openModal = () => {
    setIsOpenModal(true)
  }

  const onCloseModal = () => {
    setIsOpenModal(false)
  }

  return (
    <div className="App">
      <button onClick={openModal}>
        Toggle Button
      </button>
      {isOpenModal && (
        <Modal
          message="This is Modal."
          closingButtonText="close"
          onClose={onCloseModal}
        />
      )}
    </div>
  );
}

export default App;
1.4.6

3 years ago

1.4.5

3 years ago

1.4.4

3 years ago

1.4.3

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago