import React, { useState } from 'react'; import { Text } from 'react-native'; import { Toast, Button, Space, Modal, FloatingLayer, Popup } from '@xrnjs/ui'; import Card from '_global/Card'; import styles from './style'; /** * 基础用法示例 */ const BasicUsage = () => { const [visible, setVisible] = useState(false); return ( 文字提示 最简单的文字提示 弹窗内提示 弹窗内提示 ), footer: null, }); }} > 打开弹窗 ), footer: null, }); }} > 弹窗内提示(Modal) ), closeOnPressOverlay: true, onClose: () => close(), onClosed: () => close(), onConfirm: () => close(), footer: null, }); }} > 弹窗内提示(FloatingLayer) setVisible(false)} onClose={() => setVisible(false)} onClosed={() => setVisible(false)} > 提示位置 支持顶部、中部、底部三种位置 显示时长 自定义提示显示的时长 ); }; export default BasicUsage;