All files / lib/ModalBody index.js

100% Statements 6/6
66.67% Branches 2/3
100% Functions 1/1
100% Lines 6/6
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80                  89x       3x   3x                       89x             89x         89x                                                                                
import React from 'react';
import PropTypes from 'prop-types';
 
/**
 * @category containers
 * @component modal
 * @variations collab-ui-react
 */
 
const ModalBody = props => {
  const {
    className,
    ...other // all other standard html properties
  } = props;
 
  return (
    <div className={
      `cui-modal__body` +
      `${(className && ` ${className}`) || ''}`
      }
      {...other}
    >
      {props.children}
    </div>
  );
};
 
ModalBody.propTypes = {
  /** @prop Children nodes to render inside the ModalBody | null */
  children: PropTypes.node,
  /** @prop Optional css class names | '' */
  className: PropTypes.string,
};
 
ModalBody.defaultProps = {
  children: null,
  className: '',
};
 
ModalBody.displayName = 'ModalBody';
 
export default ModalBody;
 
/**
* @name Modal Body
*
* @category containers
* @component modal
* @section Modal Body
*
* @js
 
import {
  Input,
  ModalBody,
} from '@collab-ui/react';
 
export default function ModalBody() {
    return (
      <div className='row'>
        <br />
        <ModalBody>
          <Input
            htmlId='testMe2'
            value='testMe2'
            name='testMe2'
            label='First Input'
            disabled
            placeholder='Disabled Input'
            onChange={() => {}}
            inputHelpText='Field Must be Disabled'
            errorArr={[]}
          />
        </ModalBody>
      </div>
    );
  }
 
**/