import { Ionicons } from '@expo/vector-icons'; import { ImageBackground } from 'expo-image'; import React, { forwardRef, useImperativeHandle, useState } from 'react'; import { Modal, StyleSheet, Text, TouchableOpacity, View } from 'react-native'; import { Images } from '@/constants/images'; export interface RuleModalRef { show: () => void; close: () => void; } export const RuleModal = forwardRef((_, ref) => { const [visible, setVisible] = useState(false); useImperativeHandle(ref, () => ({ show: () => setVisible(true), close: () => setVisible(false), })); return ( setVisible(false)}> 1.房间仅可用于免费赠送手办或其它礼品 2.您可以查看完整版《用户协议》和《隐私政策》 以便了解我们收集、使用、存储信息的情况,以及对信息的保护措施 3.不支持设置私密房间 4.参与热度仅代表房间热度,不代表具体人数 特别声明:本应用内包含的所有抽奖及活动(包括APP专享活动等)均由艾斯潮盒官方发起,与苹果公司(Apple Inc.)无关。苹果公司不是上述活动的赞助商,也没有以任何形式参与上述活动。 setVisible(false)} style={styles.closeBtn}> ); }); const styles = StyleSheet.create({ overlay: { flex: 1, backgroundColor: 'rgba(0,0,0,0.6)', justifyContent: 'center', alignItems: 'center', }, contentContainer: { width: '100%', alignItems: 'center', }, bgContainer: { width: 300, // 600rpx approx height: 340, // increased for disclaimer justifyContent: 'flex-start', paddingHorizontal: 25, // 50rpx paddingTop: 75, // 150rpx }, textContent: { width: '100%', }, text: { fontSize: 12, color: '#333', marginBottom: 8, lineHeight: 18, }, closeContainer: { marginTop: 20, alignItems: 'center', }, closeBtn: { width: 32, height: 32, borderRadius: 16, backgroundColor: '#D8D8D8', justifyContent: 'center', alignItems: 'center', }, });