apeman-react-dialog
apeman react package for dialog component.
Last updated a year ago by okunishinishi .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install apeman-react-dialog 
SYNC missed versions from official npm registry.

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

Name Type Default Description

ApConfirmDialog

Props

Name Type Default Description
present bool
onSubmit func null
onCancel func null
title string
message string 'Once destroyed, there is no going back. Please be certain.'
checkboxId string `ap-confirm-dialog-checkbox-${id}`
checkboxName string `ap-confirm-check-${id}`
checkboxText string null
errorText string 'Needs check before submit.'
submitText string 'submit'

ApDialogBody

Props

Name Type Default Description

ApDialogHeader

Props

Name Type Default Description

ApDialogStyle

Props

Name Type Default Description

ApDialog

Props

Name Type Default Description
present bool false
onClose func null
spinning bool false
spinner string ApSpinner.DEFAULT_THEME
title string null
closeIcon string 'fa fa-close'

ApYesnoDialogStyle

Props

Name Type Default Description

ApYesnoDialog

Props

Name Type Default Description

License

This software is released under the MIT License.

Links

Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 0
Dependencies (10)
Dev Dependencies (27)

Copyright 2014 - 2017 © taobao.org |