<commit_before>import React from "react";
import Radium from "radium";
import { css, PropTypes } from "js-util/react";


/**
 * A triangular bullet that toggles to express
 * an "open" or "closed" state.
 */
@Radium
export default class Twisty extends React.Component {
  styles() {
    let { width, color, opacity, isOpen, isAnimated, margin, verticalAlign } = this.props;
    const narrow = Math.round(width * 0.666666)
    if (opacity < 0) { opacity = 0; }
    if (opacity > 1) { opacity = 1; }

    const base = {
      display: "inline-block",
      width: 0,
      height: 0,
      opacity: opacity,
      borderTop: `${ narrow }px solid transparent`,
      borderBottom: `${ narrow }px solid transparent`,
      borderLeft: `${ width }px solid ${ color }`,
      transform: `rotate(${ isOpen ? "90deg" : "0deg" })`,
      transition: isAnimated ? "transform 0.15s" : "none",
      cursor: "pointer",
      margin: margin
    };

    if (verticalAlign) {
      base.AbsoluteCenter = "y";
    }

    return css({ base });
  }

  handleClick(e) {
    const { onClick, isOpen } = this.props;
    if (onClick) {
      onClick({ isOpen })
    }
  }

  render() {
    const styles = this.styles();
    return <div onClick={ this.handleClick.bind(this) } style={ styles.base } />;
  }
}

// -----------------------------------------------------------------------------
Twisty.propTypes = {
  isAnimated: PropTypes.bool,
  isOpen: PropTypes.bool,
  onClick: PropTypes.func,
  width: PropTypes.number,
  color: PropTypes.string,
  opacity: PropTypes.number,
  margin: PropTypes.numberOrString,
  verticalAlign: PropTypes.bool
};
Twisty.defaultProps = {
  isAnimated: true,
  isOpen: false,
  width: 8,
  color: "#000",
  opacity: 0.3,
  margin: 0,
  verticalAlign: false
};<commit_msg><Twisty>: Remove `verticalAlign` property.<commit_after>import React from "react";
import Radium from "radium";
import { css, PropTypes } from "js-util/react";


/**
 * A triangular bullet that toggles to express
 * an "open" or "closed" state.
 */
@Radium
export default class Twisty extends React.Component {
  styles() {
    let { width, color, opacity, isOpen, isAnimated, margin } = this.props;
    const narrow = Math.round(width * 0.666666)
    if (opacity < 0) { opacity = 0; }
    if (opacity > 1) { opacity = 1; }
    return css({
      base: {
        display: "inline-block",
        width: 0,
        height: 0,
        opacity: opacity,
        borderTop: `${ narrow }px solid transparent`,
        borderBottom: `${ narrow }px solid transparent`,
        borderLeft: `${ width }px solid ${ color }`,
        transform: `rotate(${ isOpen ? "90deg" : "0deg" })`,
        transition: isAnimated ? "transform 0.15s" : "none",
        cursor: "pointer",
        margin: margin
      }
    });
  }

  handleClick(e) {
    const { onClick, isOpen } = this.props;
    if (onClick) {
      onClick({ isOpen })
    }
  }

  render() {
    const styles = this.styles();
    return <div onClick={ this.handleClick.bind(this) } style={ styles.base } />;
  }
}

// -----------------------------------------------------------------------------
Twisty.propTypes = {
  isAnimated: PropTypes.bool,
  isOpen: PropTypes.bool,
  onClick: PropTypes.func,
  width: PropTypes.number,
  color: PropTypes.string,
  opacity: PropTypes.number,
  margin: PropTypes.numberOrString
};
Twisty.defaultProps = {
  isAnimated: true,
  isOpen: false,
  width: 8,
  color: "#000",
  opacity: 0.3,
  margin: 0
};
{'fraction_non_alphanumeric': 0.18208009219245175, 'fraction_numerical': 0.0149812734082397, 'mean_word_length': 2.420689655172414, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '326344', 'n_tokens_mistral': 1109, 'n_tokens_neox': 1081, 'n_words': 298}