MCPcopy Create free account
hub / github.com/reactnativecn/react-native-update / CustomDialog

Function CustomDialog

Example/harmony_use_pushy/TestConsole.js:26–44  ·  view source on GitHub ↗
({title, visible, onConfirm})

Source from the content-addressed store, hash-verified

24
25
26const CustomDialog = ({title, visible, onConfirm}) => {
27 if (!visible) {
28 return null;
29 }
30
31 return (
32 <View style={styles.overlay}>
33 <View style={styles.dialog}>
34 <Text style={styles.title}>{title}</Text>
35 <TouchableOpacity
36 testID="done"
37 style={styles.button}
38 onPress={onConfirm}>
39 <Text style={styles.buttonText}>确认</Text>
40 </TouchableOpacity>
41 </View>
42 </View>
43 );
44};
45export default function TestConsole({visible, onClose}) {
46 const [text, setText] = useState('');
47 const [running, setRunning] = useState(false);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected