<commit_before>import classNames from 'classnames';
import uniqueId from 'lodash.uniqueid';
import React, { FunctionComponent } from 'react';

type BootstrapStyle = 'primary' | 'success' | 'info' | 'warning' | 'danger';

interface AwesomeCheckboxProps {
  bsStyle?: BootstrapStyle;
  marginRight?: boolean;
  label: React.ReactNode;
  value: boolean;
  onChange(value: boolean): void;
  disabled?: boolean;
}

export const AwesomeCheckbox: FunctionComponent<AwesomeCheckboxProps> = (
  props,
) => {
  const [id] = React.useState(uniqueId('checkbox-'));
  return (
    <div
      className={classNames(
        'checkbox',
        'awesome-checkbox',
        `checkbox-${props.bsStyle}`,
        { 'm-r-sm': props.marginRight },
      )}
    >
      <input
        type="checkbox"
        id={id}
        checked={props.value}
        onChange={(event) => props.onChange(event.target.checked)}
        disabled={props.disabled}
      />
      <label htmlFor={id}>{props.label}</label>
    </div>
  );
};

AwesomeCheckbox.defaultProps = {
  bsStyle: 'primary',
  marginRight: true,
};
<commit_msg>[WAL-4168] Boolean Description is not displayed<commit_after>import classNames from 'classnames';
import uniqueId from 'lodash.uniqueid';
import React, { FunctionComponent } from 'react';

import { Tooltip } from '@waldur/core/Tooltip';

type BootstrapStyle = 'primary' | 'success' | 'info' | 'warning' | 'danger';

interface AwesomeCheckboxProps {
  bsStyle?: BootstrapStyle;
  marginRight?: boolean;
  label: React.ReactNode;
  value: boolean;
  onChange(value: boolean): void;
  disabled?: boolean;
  tooltip?: React.ReactNode;
}

export const AwesomeCheckbox: FunctionComponent<AwesomeCheckboxProps> = (
  props,
) => {
  const [id] = React.useState(uniqueId('checkbox-'));
  return (
    <div
      className={classNames(
        'checkbox',
        'awesome-checkbox',
        `checkbox-${props.bsStyle}`,
        { 'm-r-sm': props.marginRight },
      )}
    >
      <input
        type="checkbox"
        id={id}
        checked={props.value}
        onChange={(event) => props.onChange(event.target.checked)}
        disabled={props.disabled}
      />
      <label htmlFor={id}>
        {props.tooltip && (
          <>
            <Tooltip
              label={props.tooltip}
              id={`awesome-checkbox-tooltip-${id}`}
            >
              <i className="fa fa-question-circle" />
            </Tooltip>{' '}
          </>
        )}
        {props.label}
      </label>
    </div>
  );
};

AwesomeCheckbox.defaultProps = {
  bsStyle: 'primary',
  marginRight: true,
};

{'fraction_non_alphanumeric': 0.1501350829795446, 'fraction_numerical': 0.0015438054805094559, 'mean_word_length': 2.7729257641921397, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 24, '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': '7122592', 'n_tokens_mistral': 812, 'n_tokens_neox': 794, 'n_words': 153}