SuggestionsOverlay.js 866 Bytes
import React,{PropTypes,Children} from 'react';
import ReactDOM from 'react-dom';  
import cx from 'classnames';
import s from './ChatTextarea.scss';


class SuggestionsOverlay extends React.Component {
    constructor(props) {
        super(props);     
    }
    static propTypes = { 
        children:PropTypes.oneOfType([
            PropTypes.element,
            PropTypes.arrayOf(PropTypes.element)
        ])    
    } 
    static defaultProps={ 
    } 
    renderSuggestions(){
        return React.Children.map(this.props.children,(context)=>{ 
            console.log(context);
            return null;
        })
    }
    render(){   
        return( 
            <div className={cx()}> 
                <ul>
                    {this.renderSuggestions()}
                </ul>
            </div> 
        )
    }
}



export default SuggestionsOverlay;