import { Box } from '@rocket.chat/fuselage'; import type { ComponentProps, ReactElement } from 'react'; import React from 'react'; import NegativeGrowthSymbol from './NegativeGrowthSymbol'; import PositiveGrowthSymbol from './PositiveGrowthSymbol'; type GrowthProps = ComponentProps & { children: number; }; const Growth = ({ children, ...props }: GrowthProps): ReactElement | null => { if (children === 0) { return null; } return ( {children < 0 ? : } {String(Math.abs(children))} ); }; export default Growth;