import React from 'react'; import { Text as NativeText } 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 './types'; const StyledText = styled(NativeText)( 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 ( {children} ); }; export default React.memo(React.forwardRef(Text)); export type { ITextProps };