import * as React from 'react'; import {View, Text} from 'react-native'; import {Style, TailwindFn} from 'twrnc/dist/esm/types'; export type BalloonData = {title: string; value: string | number}[]; type Props = { tw: TailwindFn; balloonData: {title: string; value: string | number}[]; position: [number, number]; style?: Style; fontStyle?: Style; }; const Balloon = ({tw, balloonData, position, style, fontStyle}: Props) => { const defaultStyle = tw`p-2 bg-gray-600 rounded-md absolute`; const defaultFontStyle = tw`text-xs text-white`; if (balloonData.length) { return ( {balloonData.map((data, idx) => ( {`${data}`} ))} ); } return null; }; export default Balloon;