import React from 'react'; import { View, Pressable, Text } from 'react-native'; import Icon from '@pingtou/rn-vant-icons'; import Dialog from './Dialog'; import { useThemeFactory } from '../Theme'; import { createStyle } from './style'; import type { PopupProps } from './type'; const Popup = (props: PopupProps): JSX.Element => { const { children, round, closeable, closeIcon = 'cross', closeIconPosition = 'top-right', position, onClose, visible, title, style, ...rest } = props; const { styles, theme } = useThemeFactory(createStyle, { closeIconPosition, position }); return ( {!!title && {title}} {closeable && ( )} {children} ); }; export default Popup;