import * as React from 'react';
import {TextProps, Text, TextStyle} from 'react-native';
import {useSiteSettings} from '../../providers/site';

export const ContentText = ({
  children,
  style,
  ...props
}: TextProps & {children: React.ReactNode}) => {
  const {style: siteStyle} = useSiteSettings();
  return (
    <Text
      style={{color: siteStyle.content_text_color, ...(style as TextStyle)}}
      {...props}>
      {children}
    </Text>
  );
};
