Advertisement
eri_qlue

Flat - Feedback

Dec 21st, 2017
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. export default class Feedback extends Component {
  2.   constructor(props) {
  3.     super(props);
  4.     this.state = {
  5.       rating: null,
  6.     }
  7.   }
  8.  
  9.   ratingCompleted(rating) {
  10.     console.log("Rating is: " + rating)
  11.     this.setState({ rating: rating })
  12.   }
  13.  
  14.   render() {
  15.     return (
  16.       <View style={styles.container}>
  17.         <Card image={{ uri: item.image }}>
  18.           <View style={styles.thumbnailContainer}>
  19.             <Avatar
  20.               small
  21.               rounded
  22.               source={{ uri: item.avatar }}
  23.               onPress={() => {}}
  24.               activeOpacity={0.7}
  25.             />
  26.             <Text style={styles.name}>{item.name}</Text>
  27.           </View>
  28.           <Text style={{ marginBottom: 10, marginTop: 10 }}>
  29.             {item.content}
  30.           </Text>
  31.         </Card>
  32.         <Rating
  33.           showRating
  34.           type="star"
  35.           fractions={1}
  36.           startingValue={3.6}
  37.           readonly
  38.           imageSize={40}
  39.           onFinishRating={this.ratingCompleted}
  40.           style={{ paddingVertical: 10 }}
  41.         />
  42.       </View>
  43.     );
  44.   }
  45. }
  46.  
  47. deskripsi :
  48. kode ini untuk melihat detail report dan memberikan hasil progress nya melaluin rating / feedback
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement