📅  最后修改于: 2022-03-11 15:01:48.637000             🧑  作者: Mango
import React, { useState } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import RatingModal from 'react-native-rating-modal-box';
const App = () => {
const [isOpenRating, setOpenRating] = useState(true);
return (
setOpenRating(false)}
visible={isOpenRating}
ratingConfirm={selectedRating => {
console.log('Selected rating', selectedRating);
}}
/>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: "center",
},
text: {
fontSize: 16
},
wrapperCustom: {
borderRadius: 8,
padding: 6
},
logBox: {
padding: 20,
margin: 10,
borderWidth: StyleSheet.hairlineWidth,
borderColor: '#f0f0f0',
backgroundColor: '#f9f9f9'
}
});
export default App;