<commit_before>import React, { PropTypes } from 'react';

import { PropertyTypePropType } from './PropertyTypeStorage';
import styles from './propertype.module.css';

export default class PropertyType extends React.Component {
  static propTypes = {
    propertyType: PropertyTypePropType.isRequired,
  };

  render() {
    const { propertyType } = this.props;

    let description;
    if (propertyType.description) {
      description = propertyType.description;
    } else {
      description = (<em>No description</em>);
    }

    return (
      <div className={styles.propertyType}>
        <div className={styles.title}>{propertyType.title}</div>
        <div className={styles.description}>{description}</div>
      </div>
    );
  }
}<commit_msg>Added ExpandableText to PropertyType description<commit_after>import React, { PropTypes } from 'react';

import { PropertyTypePropType } from './PropertyTypeStorage';
import ExpandableText from '../utils/ExpandableText';
import styles from './propertype.module.css';

const MAX_DESCRIPTION_LENGTH = 300;

export default class PropertyType extends React.Component {
  static propTypes = {
    propertyType: PropertyTypePropType.isRequired,
  };

  render() {
    const { propertyType } = this.props;

    let description;
    if (propertyType.description) {
      description = (<ExpandableText text={propertyType.description} maxLength={MAX_DESCRIPTION_LENGTH}/>);
    } else {
      description = (<em>No description</em>);
    }

    return (
      <div className={styles.propertyType}>
        <div className={styles.title}>{propertyType.title}</div>
        <div className={styles.description}>
          {description}
        </div>
      </div>
    );
  }
}
{'fraction_non_alphanumeric': 0.12456344586728754, 'fraction_numerical': 0.0017462165308498253, 'mean_word_length': 3.5118110236220472, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, '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': '2001464', 'n_tokens_mistral': 480, 'n_tokens_neox': 464, 'n_words': 105}