import React, { Component } from 'react';
import PropTypes from 'prop-types';
import cx from 'classnames';

import styles from '../utils/styles';

class Item extends Component {
  static propTypes = {
    children: PropTypes.node.isRequired,
    className: PropTypes.string,
    style: PropTypes.object,
    nativeEvent: PropTypes.object,
    propsFromTrigger: PropTypes.object,
    disabled: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),
    onClick: PropTypes.func
  };

  static defaultProps = {
    className: null,
    style: {},
    disabled: false,
    onClick: () => {},
    nativeEvent: {},
    propsFromTrigger: {}
  };

  disabled = false;

  handleClick = e => {
    this.disabled
      ? e.stopPropagation()
      : this.props.onClick({
          event: this.props.nativeEvent,
          props: this.props.propsFromTrigger
        });
  };

  render() {
    const {
      className,
      disabled,
      style,
      children,
      nativeEvent,
      propsFromTrigger
    } = this.props;

    this.disabled =
      typeof disabled === 'function'
        ? disabled({
            event: nativeEvent,
            props: propsFromTrigger,
          })
        : disabled;

    const cssClasses = cx(styles.item, className, {
      [`${styles.itemDisabled}`]: this.disabled
    });

    return (
      <div
        className={cssClasses}
        style={style}
        onClick={this.handleClick}
        role="presentation"
      >
        <div className={styles.itemContent}>{children}</div>
      </div>
    );
  }
}

export default Item;

@@ -383,17 +383,16 @@
  disable
-d
 : PropTy
@@ -467,16 +467,44 @@
 pes.func
+,%0A    data: PropTypes.object
 %0A  %7D;%0A%0A 
@@ -575,17 +575,16 @@
  disable
-d
 : false,
@@ -649,16 +649,30 @@
 Trigger:
+ %7B%7D,%0A    data:
  %7B%7D%0A  %7D;
@@ -675,17 +675,19 @@
   %7D;%0A%0A  
-d
+isD
 isabled 
@@ -724,25 +724,27 @@
  %7B%0A    this.
-d
+isD
 isabled%0A    
@@ -854,16 +854,21 @@
  props: 
+%7B ...
 this.pro
@@ -882,24 +882,46 @@
 sFromTrigger
+, ...this.props.data %7D
 %0A        %7D);
@@ -982,17 +982,16 @@
  disable
-d
 ,%0A      
@@ -1054,16 +1054,28 @@
 mTrigger
+,%0A      data
 %0A    %7D =
@@ -1093,25 +1093,27 @@
 ;%0A%0A    this.
-d
+isD
 isabled =%0A  
@@ -1130,17 +1130,16 @@
  disable
-d
  === 'fu
@@ -1163,17 +1163,16 @@
  disable
-d
 (%7B%0A     
@@ -1217,16 +1217,21 @@
  props: 
+%7B ...
 propsFro
@@ -1235,24 +1235,34 @@
 FromTrigger,
+ ...data %7D
 %0A          %7D
@@ -1280,17 +1280,16 @@
  disable
-d
 ;%0A%0A    c
@@ -1374,17 +1374,19 @@
 %5D: this.
-d
+isD
 isabled%0A

Update Item component