0.2.0 • Published 7 years ago

@fate-lovely/react-dialog v0.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 years ago

React Dialog

License

a simple dialog component for React

Installation

npm

npm i --save @fate-lovely/react-dialog

cdn

<script src="https://unpkg.com/@fate-lovely/react-dialog/dist/index.js"></script>

Usage

import { showDialog, Dialog } from "@fate-lovely/react-dialog"

const MyDialog = () =>
  <Dialog>
    <h1>Hello World</h1>
  </Dialog>

class App extends React.Component {
  ...
  onClick() {
    showDialog(MyDialog, props)
  }
}

Props

  • className: PorpTypes.string
  • okButtonText: PropTypes.string
  • cancelButtonText: PropTypes.string
  • okButtonCB: PropTypes.func, dialog instance as first param cmp, you can call cmp.destroy() to destroy dialog
  • cancelButtonCB: PropTypes.func, dialog instance as first param cmp, you can call cmp.destroy() to destroy dialog
  • hideCancelButton: PropTypes.bool
  • title: PorpTypes.string
  • okButtonDisabled PropTypes.bool

License

Released under the MIT license

0.2.0

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

8 years ago

0.1.4

8 years ago

0.1.3

8 years ago

0.1.2

8 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.0

8 years ago