<commit_before>/* eslint-disable react/jsx-wrap-multilines */
/* eslint-disable react/forbid-prop-types */
import React from 'react';
import PropTypes from 'prop-types';
import { Text, TextInput } from 'react-native';

import { BACKGROUND_COLOR, APP_FONT_FAMILY, DARKER_GREY } from '../globalStyles';

import { FlexRow } from './FlexRow';

export const TextEditor = ({
  label,
  labelStyle,
  containerStyle,
  textInputStyle,
  size,
  ...textInputProps
}) => {
  const isSmall = size === 'small';
  const sizeAdjustment = { width: isSmall ? 190 : 350 };
  const internalTextInput = [textInputStyle, sizeAdjustment];
  return (
    <FlexRow flex={0} alignItems="center" style={{ ...containerStyle }}>
      {isSmall && <Text style={labelStyle}>{label}</Text>}
      <TextInput {...textInputProps} selectTextOnFocus style={internalTextInput} />
    </FlexRow>
  );
};

TextEditor.defaultProps = {
  containerStyle: { minWidth: 190 },
  textInputStyle: {
    fontSize: 14,
    color: DARKER_GREY,

    fontFamily: APP_FONT_FAMILY,
    backgroundColor: BACKGROUND_COLOR,
  },
  labelStyle: {
    fontSize: 12,
    fontFamily: APP_FONT_FAMILY,
    color: DARKER_GREY,
    textAlign: 'right',
    marginRight: 10,
    width: 90,
  },
  size: 'small',
  label: '',
};

TextEditor.propTypes = {
  label: PropTypes.string,
  labelStyle: PropTypes.object,
  containerStyle: PropTypes.object,
  size: PropTypes.oneOf(['small', 'large']),
  textInputStyle: PropTypes.object,
};
<commit_msg>TextEditor a bit wider<commit_after>/* eslint-disable react/jsx-wrap-multilines */
/* eslint-disable react/forbid-prop-types */
import React from 'react';
import PropTypes from 'prop-types';
import { Text, TextInput } from 'react-native';

import { BACKGROUND_COLOR, APP_FONT_FAMILY, DARKER_GREY } from '../globalStyles';

import { FlexRow } from './FlexRow';

export const TextEditor = ({
  label,
  labelStyle,
  containerStyle,
  textInputStyle,
  size,
  ...textInputProps
}) => {
  const isSmall = size === 'small';
  const sizeAdjustment = { width: isSmall ? 190 : 500 };
  const internalTextInput = [textInputStyle, sizeAdjustment];
  return (
    <FlexRow flex={0} alignItems="center" style={{ ...containerStyle }}>
      {isSmall && <Text style={labelStyle}>{label}</Text>}
      <TextInput {...textInputProps} selectTextOnFocus style={internalTextInput} />
    </FlexRow>
  );
};

TextEditor.defaultProps = {
  containerStyle: { minWidth: 190 },
  textInputStyle: {
    fontSize: 14,
    color: DARKER_GREY,

    fontFamily: APP_FONT_FAMILY,
    backgroundColor: BACKGROUND_COLOR,
  },
  labelStyle: {
    fontSize: 12,
    fontFamily: APP_FONT_FAMILY,
    color: DARKER_GREY,
    textAlign: 'right',
    marginRight: 10,
    width: 90,
  },
  size: 'small',
  label: '',
};

TextEditor.propTypes = {
  label: PropTypes.string,
  labelStyle: PropTypes.object,
  containerStyle: PropTypes.object,
  size: PropTypes.oneOf(['small', 'large']),
  textInputStyle: PropTypes.object,
};

{'fraction_non_alphanumeric': 0.1420397172669135, 'fraction_numerical': 0.012117132278694043, 'mean_word_length': 3.9698996655518393, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, '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': '2980187', 'n_tokens_mistral': 1045, 'n_tokens_neox': 980, 'n_words': 215}