import * as React from "react"; import { Text, View } from "@flip.id/ui-kit"; import type { IBadgePropsNew } from "./types"; import type { IViewProps } from "native-base/lib/typescript/components/basic/View/types"; const BadgeIndicator = (props: IBadgePropsNew) => { const dotStyle = React.useMemo( () => (!props.label ? { px: "1", py: "1", alignSelf: "center" } : {}), [props.label] ); const labelGenerator = React.useMemo( () => (props?.label && props?.label > 999 ? "999+" : props?.label), [props.label] ); return ( {props.label !== "" && ( {labelGenerator} )} ); }; export default BadgeIndicator;