-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a002254
commit 350ef21
Showing
137 changed files
with
10,355 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
website/versioned_docs/version-4.0.0-rc.3/component_usage/AirbnbRating.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
```SnackPlayer name=RNE AirbnbRating | ||
import React from 'react'; | ||
import { StyleSheet, Text, View, Platform, ScrollView } from 'react-native'; | ||
import { AirbnbRating } from '@rneui/themed'; | ||
type RatingsComponentProps = {}; | ||
const Ratings: React.FunctionComponent<RatingsComponentProps> = () => { | ||
const ratingCompleted = (rating: number) => { | ||
console.log('Rating is: ' + rating); | ||
}; | ||
const ratingProps = {}; | ||
return ( | ||
<View style={styles.container}> | ||
<ScrollView style={styles.viewContainer}> | ||
<View | ||
style={{ | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
marginBottom: 30, | ||
}} | ||
> | ||
<AirbnbRating /> | ||
<AirbnbRating isDisabled={true}/> | ||
<AirbnbRating | ||
count={11} | ||
reviews={[ | ||
'Terrible', | ||
'Bad', | ||
'Meh', | ||
'OK', | ||
'Good', | ||
'Hmm...', | ||
'Very Good', | ||
'Wow', | ||
'Amazing', | ||
'Unbelievable', | ||
'Jesus', | ||
]} | ||
defaultRating={11} | ||
size={20} | ||
/> | ||
</View> | ||
</ScrollView> | ||
</View> | ||
); | ||
}; | ||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
}, | ||
headingContainer: { | ||
paddingTop: 50, | ||
}, | ||
titleText: { | ||
fontSize: 25, | ||
fontWeight: 'bold', | ||
textAlign: 'center', | ||
paddingVertical: 5, | ||
fontFamily: Platform.OS === 'ios' ? 'Menlo-Bold' : '', | ||
color: '#27ae60', | ||
}, | ||
subtitleText: { | ||
fontSize: 18, | ||
fontWeight: '400', | ||
textAlign: 'center', | ||
fontFamily: Platform.OS === 'ios' ? 'Trebuchet MS' : '', | ||
color: '#34495e', | ||
}, | ||
viewContainer: { | ||
flex: 1, | ||
}, | ||
rating: { | ||
paddingVertical: 10, | ||
}, | ||
}); | ||
export default Ratings; | ||
``` |
Oops, something went wrong.