<commit_before>import 'rc-tooltip/assets/bootstrap.css';
import styles from './style.postcss';

import React from 'react';
import RcTooltip from 'rc-tooltip';
import is from 'is_js';

const Tooltip = (props) => {
  if (is.not.string(props.text) || is.empty(props.text)) {
    return <div className={props.className}>props.children</div>;
  }

  return <RcTooltip placement="top"
      trigger={['hover']}
      destroyPopupOnHide
      overlay={<div className={styles.Tooltip_bubble}>{props.text}</div>}>
    <div className={props.className}>{props.children}</div>
  </RcTooltip>;
};

Tooltip.propTypes = {
  children: React.PropTypes.node,
  text: React.PropTypes.string,
  className: React.PropTypes.string,
};
<commit_msg>add the ability to set placement for tooltip<commit_after>import 'rc-tooltip/assets/bootstrap.css';
import styles from './style.postcss';

import React from 'react';
import RcTooltip from 'rc-tooltip';
import is from 'is_js';

const Tooltip = (props) => {
  if (is.not.string(props.text) || is.empty(props.text)) {
    return <div className={props.className}>props.children</div>;
  }

  const placement = is.existy(props.placement) ? props.placement : 'top';

  return <RcTooltip placement={placement}
      trigger={['hover']}
      destroyPopupOnHide
      overlay={<div className={styles.Tooltip_bubble}>{props.text}</div>}>
    <div className={props.className}>{props.children}</div>
  </RcTooltip>;
};

Tooltip.propTypes = {
  children: React.PropTypes.node,
  text: React.PropTypes.string,
  className: React.PropTypes.string,
  placement: React.PropTypes.string,
};

{'fraction_non_alphanumeric': 0.15947467166979362, 'fraction_numerical': 0.0, 'mean_word_length': 4.633802816901408, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2469271', 'n_tokens_mistral': 509, 'n_tokens_neox': 515, 'n_words': 102}