<commit_before>import React from 'react';
import { Text as NativeText } from 'react-native';
import type { Text as TextType } from 'react-native';
import styled from 'styled-components/native';
import {
  color,
  position,
  space,
  typography,
  layout,
  flexbox,
  border,
} from 'styled-system';
import { useThemeProps } from '../../../hooks/useThemeProps';
import {
  customBorder,
  customBackground,
  customOutline,
  customLayout,
  customExtra,
  customShadow,
  customTypography,
  customPosition,
} from '../../../utils/customProps';
import type { ITextProps } from './props';

const StyledText = styled(NativeText)<ITextProps>(
  color,
  space,
  position,
  layout,
  flexbox,
  border,
  typography,
  position,
  customPosition,
  customBorder,
  customBackground,
  customOutline,
  customShadow,
  customExtra,
  customLayout,
  customTypography
);

const Text = (
  {
    children,
    style,
    isTruncated,
    noOfLines,
    bold,
    italic,
    sub,
    highlight,
    underline,
    strikeThrough,
    ...props
  }: ITextProps,
  ref: any
) => {
  const newProps = useThemeProps('Text', props);
  return (
    <StyledText
      numberOfLines={noOfLines ? noOfLines : isTruncated ? 1 : 999}
      fontWeight={bold ? 'bold' : undefined}
      fontStyle={italic ? 'italic' : undefined}
      bg={highlight ? 'yellow.200' : undefined}
      textDecorationLine={
        underline ? 'underline' : strikeThrough ? 'line-through' : undefined
      }
      {...newProps}
      fontSize={sub ? 10 : newProps.fontSize}
      style={style}
      ref={ref}
    >
      {children}
    </StyledText>
  );
};

export default React.memo(React.forwardRef<TextType, ITextProps>(Text));
export type { ITextProps };<commit_msg>Fixes for Text bold<commit_after>import React from 'react';
import { Text as NativeText } from 'react-native';
import type { Text as TextType } from 'react-native';
import styled from 'styled-components/native';
import {
  color,
  position,
  space,
  typography,
  layout,
  flexbox,
  border,
} from 'styled-system';
import { useThemeProps } from '../../../hooks/useThemeProps';
import {
  customBorder,
  customBackground,
  customOutline,
  customLayout,
  customExtra,
  customShadow,
  customTypography,
  customPosition,
} from '../../../utils/customProps';
import type { ITextProps } from './props';

const StyledText = styled(NativeText)<ITextProps>(
  color,
  space,
  position,
  layout,
  flexbox,
  border,
  typography,
  position,
  customPosition,
  customBorder,
  customBackground,
  customOutline,
  customShadow,
  customExtra,
  customLayout,
  customTypography
);

const Text = (
  {
    children,
    style,
    isTruncated,
    noOfLines,
    bold,
    italic,
    sub,
    highlight,
    underline,
    strikeThrough,
    ...props
  }: ITextProps,
  ref: any
) => {
  const newProps = useThemeProps('Text', props);
  return (
    <StyledText
      {...newProps}
      numberOfLines={noOfLines ? noOfLines : isTruncated ? 1 : 999}
      fontWeight={bold ? 'bold' : newProps.fontWeight}
      fontStyle={italic ? 'italic' : newProps.fontStyle}
      bg={highlight ? 'yellow.200' : newProps.bg}
      textDecorationLine={
        underline
          ? 'underline'
          : strikeThrough
          ? 'line-through'
          : newProps.textDecorationLine
      }
      fontSize={sub ? 10 : newProps.fontSize}
      style={style}
      ref={ref}
    >
      {children}
    </StyledText>
  );
};

export default React.memo(React.forwardRef<TextType, ITextProps>(Text));
export type { ITextProps };
{'fraction_non_alphanumeric': 0.12369974697779028, 'fraction_numerical': 0.005060444194545966, 'mean_word_length': 3.0340136054421767, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '3819518', 'n_tokens_mistral': 1170, 'n_tokens_neox': 1141, 'n_words': 257}