import React from 'react'; import { Box, IBoxProps, Text, ITextProps, IIconProps, HStack, IStackProps, } from '../../primitives'; import { useThemeProps } from '../../../hooks'; import { ChevronDownIcon, ChevronUpIcon } from '../../primitives/Icon/Icons'; export const StatLabel = React.memo( React.forwardRef(({ style, ...props }: ITextProps, ref?: any) => { let newProps = useThemeProps('Stat', props); return ( {props.children} ); }) ); export const StatNumber = React.memo( React.forwardRef(({ style, ...props }: ITextProps, ref?: any) => { let newProps = useThemeProps('Stat', props); return ( {props.children} ); }) ); export const StatHelpText = React.memo( React.forwardRef(({ style, ...props }: IBoxProps, ref?: any) => { let newProps = useThemeProps('Stat', props); return ( {props.children} ); }) ); type IStatArrowProps = IIconProps & { type?: 'increase' | 'decrease' }; export const StatArrow = React.memo( React.forwardRef(({ type, ...props }: IStatArrowProps, ref?: any) => { return type === 'increase' ? ( ) : ( ); }) ); export const StatGroup = React.memo( React.forwardRef(({ style, ...props }: IBoxProps, ref: any) => { let newProps = useThemeProps('Stat', props); return ( ); }) ); const StatMain = React.forwardRef( ({ style, ...props }: IBoxProps, ref: any) => { return ; } ); type IStatComponentType = (( props: IBoxProps & { ref?: any } ) => JSX.Element) & { Label: React.MemoExoticComponent< (props: ITextProps & { ref?: any }) => JSX.Element >; Number: React.MemoExoticComponent< (props: ITextProps & { ref?: any }) => JSX.Element >; HelpText: React.MemoExoticComponent< (props: IBoxProps & { ref?: any }) => JSX.Element >; Arrow: React.MemoExoticComponent< (props: IStatArrowProps & { ref?: any }) => JSX.Element >; Group: React.MemoExoticComponent< (props: IStackProps & { ref?: any }) => JSX.Element >; }; const StatTemp: any = StatMain; StatTemp.Label = StatLabel; StatTemp.Number = StatNumber; StatTemp.HelpText = StatHelpText; StatTemp.Arrow = StatArrow; StatTemp.Group = StatGroup; const Stat = StatTemp as IStatComponentType; export default Stat;