How to use the reactstrap.Modal.propTypes function in reactstrap

To help you get started, we’ve selected a few reactstrap examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github go-faast / faast-web / src / app / components / ShareModal.jsx View on Github external
import { Modal, ModalHeader, ModalBody, Card, CardBody, Input, Button, Row, Col } from 'reactstrap'
import { pick } from 'lodash'

import routes from 'Routes'
import { routerPathToUri } from 'Utilities/helpers'
import toastr from 'Utilities/toastrWrapper'
import WalletSummary from 'Components/WalletSummary'
import T from 'Components/i18n/T'

const closeCondition = ({ wallet }) => !wallet.address

export default compose(
  setDisplayName('ShareModal'),
  setPropTypes({
    wallet: PropTypes.object.isRequired,
    ...Modal.propTypes
  }),
  withHandlers(() => {
    let inputRef
    return {
      handleRef: () => (ref) => {
        inputRef = ref
      },
      handleFocus: () => (event) => {
        event.target.select()
      },
      handleCopy: () => () => {
        inputRef.select()
        document.execCommand('copy')
        toastr.info('Link copied to clipboard')
      },
    }
github go-faast / faast-web / src / app / components / Affiliate / AccountModal / index.jsx View on Github external
import { compose, setDisplayName, setPropTypes } from 'recompose'
import { connect } from 'react-redux'
import { createStructuredSelector } from 'reselect'
import { Modal, ModalBody, ModalHeader, Row, Col, Input } from 'reactstrap'
import { pick } from 'lodash'
import classNames from 'class-names'

import { affiliateId, secretKey, } from 'Selectors'

import { modalShadow, apiDocs } from './style'
import { cardHeader, input, text } from '../style'

export default compose(
  setDisplayName('AccountInfoModal'),
  setPropTypes({
    ...Modal.propTypes,
  }),
  connect(createStructuredSelector({
    affiliateId,
    secretKey,
  }), {
  }),
)(({ affiliateId, secretKey, toggle, ...props }) => {
  return (
    
      close} tag='h4' toggle={toggle} className={cardHeader}>
      Affiliate Account Info
github go-faast / faast-web / src / app / components / ShareModal.jsx View on Github external
)(({ wallet, walletUri, showDirectLink, toggle, handleRef, handleFocus, handleCopy, ...props }) => (
  
    
      Share Portfolio
    
    
      
        
      
      Permalink:
      
        
          <input value="{walletUri}/" readonly="" type="text">
        
        
          <button color="link">
            <i></i></button>
github go-faast / faast-web / src / app / components / Affiliate / AccountModal / index.jsx View on Github external
)(({ affiliateId, secretKey, toggle, ...props }) =&gt; {
  return (
    
      close} tag='h4' toggle={toggle} className={cardHeader}&gt;
      Affiliate Account Info
      
      
        
          
            <small><p>Affiliate Id</p></small>
            <input readonly="" type="text" value="{affiliateId}">
          
          
            <small><p>Secret Key</p></small>
            <input readonly="" type="text" value="{secretKey}">
          
          <small><p>
            * Save these credentials somewhere safe. You will need them to access the affiliate dashboard and authenticate API requests.
          </p></small>