import React from 'react'; import { View, StyleSheet } from 'react-native'; import Form from '../index'; import Input from '../../Input'; import Switch from '../../Switch'; import Button from '../../Button'; import { ScrollView } from 'react-native'; import BottomSafeArea from '../../BottomSafeArea'; import { Fill, Toast } from '@xrnjs/ui'; import Card from '_global/Card'; type FormData = { username: string; email: string; password: string; allowNotifications: boolean; agreeTerms: boolean; }; const TooltipDemo: React.FC = () => { const form = Form.useForm({ defaultValues: { username: '', email: '', password: '', allowNotifications: false, agreeTerms: false, }, }); const onSubmit = (data: FormData) => { console.log('Form submitted:', data); Toast(`提交成功 用户名: ${data.username}`); }; return ( {/* 基础 tooltip 示例 */} {/* 带标题的 tooltip 示例 */} {/* 自定义确认按钮文本的 tooltip 示例 */} value === true || '必须同意服务条款才能继续', }} > {/* 复杂场景 tooltip 示例 */} ); }; const styles = StyleSheet.create({ container: { flex: 1, padding: 20, backgroundColor: '#f5f5f5', }, cardStyle: { marginBottom: 16, }, buttonContainer: { marginTop: 30, flexDirection: 'row', justifyContent: 'center', }, buttonSpacer: { width: 20, }, }); export default TooltipDemo;