<commit_before>import React from "react"
import PropTypes from "prop-types"
import Button from "react-toolbox/lib/button/Button"
import Tooltip from "react-toolbox/lib/tooltip"

const TooltipButton = Tooltip(Button)

const TooltipIcon = props => {
  /* Mean hack forcing variable coercition
     until https://github.com/mapbox/remark-react/issues/41 is fixed
     https://github.com/mapbox/remark-react/pull/43
     https://github.com/medfreeman/remark-generic-extensions/issues/9
  */
  const { floating, accent, raised, primary, ...otherProps } = props
  otherProps.floating = floating === "true" ? true : false
  otherProps.accent = accent === "true" ? true : false
  otherProps.raised = raised === "true" ? true : false
  otherProps.primary = primary === "true" ? true : false

  return (
    <TooltipButton { ...otherProps }/>
  )
}

TooltipIcon.propTypes = {
  accent: PropTypes.oneOfType([
    PropTypes.node,
    PropTypes.string,
  ]),
  icon: PropTypes.oneOfType([
    PropTypes.node,
    PropTypes.string,
  ]).isRequired,
  floating: PropTypes.oneOfType([
    PropTypes.bool,
    PropTypes.string,
  ]),
  primary: PropTypes.oneOfType([
    PropTypes.node,
    PropTypes.string,
  ]),
  raised: PropTypes.oneOfType([
    PropTypes.node,
    PropTypes.string,
  ]),
  tooltip: PropTypes.any.isRequired,
  theme: PropTypes.object,
}

export default TooltipIcon<commit_msg>fix(example-react-toolbox-icon): fix propTypes<commit_after>import React from "react"
import PropTypes from "prop-types"
import Button from "react-toolbox/lib/button/Button"
import Tooltip from "react-toolbox/lib/tooltip"

const TooltipButton = Tooltip(Button)

const TooltipIcon = props => {
  /* Mean hack forcing variable coercition
     until https://github.com/mapbox/remark-react/issues/41 is fixed
     https://github.com/mapbox/remark-react/pull/43
     https://github.com/medfreeman/remark-generic-extensions/issues/9
  */
  const { floating, accent, raised, primary, ...otherProps } = props
  otherProps.floating = floating === "true" ? true : false
  otherProps.accent = accent === "true" ? true : false
  otherProps.raised = raised === "true" ? true : false
  otherProps.primary = primary === "true" ? true : false

  return (
    <TooltipButton { ...otherProps }/>
  )
}

TooltipIcon.propTypes = {
  accent: PropTypes.oneOfType([
    PropTypes.bool,
    PropTypes.string,
  ]),
  icon: PropTypes.oneOfType([
    PropTypes.node,
    PropTypes.string,
  ]).isRequired,
  floating: PropTypes.oneOfType([
    PropTypes.bool,
    PropTypes.string,
  ]),
  primary: PropTypes.oneOfType([
    PropTypes.bool,
    PropTypes.string,
  ]),
  raised: PropTypes.oneOfType([
    PropTypes.bool,
    PropTypes.string,
  ]),
  tooltip: PropTypes.any.isRequired
}

export default TooltipIcon
{'fraction_non_alphanumeric': 0.13208228076506676, 'fraction_numerical': 0.003608805485384338, 'mean_word_length': 3.612312811980033, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 6, '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': '2972037', 'n_tokens_mistral': 863, 'n_tokens_neox': 881, 'n_words': 183}