3.1.1 • Published 9 years ago

apeman-react-dialog v3.1.1

Weekly downloads
5
License
MIT
Repository
github
Last release
9 years ago

apeman-react-dialog

Build Status Code Climate Code Coverage npm Version JS Standard

apeman react package for dialog component.

Installation

$ npm install apeman-react-dialog --save

Demo

Live demo is hosted on GitHub Pages.

Usage

'use strict'

import React from 'react'
import {
  ApDialog,
  ApDialogHeader,
  ApDialogBody,
  ApDialogStyle
} from 'apeman-react-dialog'

const ExampleComponent = React.createClass({
  getInitialState () {
    return {
      dialogEnabled: true
    }
  },
  render () {
    const s = this
    let state = s.state
    return (
      <div>
        <ApDialogStyle />
        <ApDialog enabled={state.dialogEnabled}
                  onClose={() =>{s.toggleDialog(false)} }>
          <ApDialogHeader>Dialog Header</ApDialogHeader>
          <ApDialogBody>Dialog Body</ApDialogBody>
        </ApDialog>
      </div>
    )
  },
  toggleDialog (enabled) {
    const s = this
    s.setState({
      dialogEnabled: enabled
    })
  }
})

Components

ApConfirmDialogStyle

Props

NameTypeDefaultDescription

ApConfirmDialog

Props

NameTypeDefaultDescription
presentbool
onSubmitfuncnullHandler for submit event
onCancelfuncnullHandler for cancel event
titlestringDialog title
messagestring'Once destroyed, there is no going back. Please be certain.'Dialog message
checkboxIdstring`ap-confirm-dialog-checkbox-${id}`Id of checkbox
checkboxNamestring`ap-confirm-check-${id}`Name of checkbox
checkboxTextstringnullLabel text of checkbox
errorTextstring'Needs check before submit.'Errot text when not checked
submitTextstring'submit'Submit button text

ApDialogBody

Props

NameTypeDefaultDescription

ApDialogHeader

Props

NameTypeDefaultDescription

ApDialogStyle

Props

NameTypeDefaultDescription

ApDialog

Props

NameTypeDefaultDescription
presentboolfalse
onClosefuncnull
spinningboolfalse
spinnerstringApSpinner.DEFAULT_THEME
titlestringnull
closeIconstring'fa fa-close'

ApYesnoDialogStyle

Props

NameTypeDefaultDescription

ApYesnoDialog

Props

NameTypeDefaultDescription

License

This software is released under the MIT License.

Links

3.1.1

9 years ago

3.1.0

9 years ago

3.0.2

9 years ago

3.0.1

9 years ago

3.0.0

9 years ago

2.0.7

9 years ago

2.0.6

9 years ago

2.0.5

9 years ago

2.0.4

9 years ago

2.0.3

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.2.10

9 years ago

1.2.9

9 years ago

1.2.8

9 years ago

1.2.7

9 years ago

1.2.6

9 years ago

1.2.5

9 years ago

1.2.4

9 years ago

1.2.3

9 years ago

1.2.2

9 years ago

1.2.1

9 years ago

1.2.0

9 years ago

1.1.4

9 years ago

1.1.3

9 years ago

1.1.2

9 years ago

1.1.1

9 years ago

1.1.0

10 years ago

1.0.2

10 years ago

1.0.1

10 years ago

1.0.0

10 years ago