change the appearance of the uri bar input (#561)

* change the appearance of the uri bar input
* improve no search results display
This commit is contained in:
Akinwale Ariwodola 2019-05-29 11:53:27 +01:00 committed by GitHub
parent 10beb9935f
commit 7f57447e57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 26 additions and 12 deletions

View file

@ -104,8 +104,7 @@ class SearchPage extends React.PureComponent {
<ActivityIndicator size="large" color={Colors.LbryGreen} style={searchStyle.loading} />
</View>}
{!isSearching && (!uris || uris.length === 0) &&
<Text style={searchStyle.noResultsText}>No results to display.</Text>}
{!isSearching &&
<ScrollView
style={searchStyle.scrollContainer}
@ -127,6 +126,10 @@ class SearchPage extends React.PureComponent {
navigation={navigation}
onPress={() => navigateToUri(navigation, uri)}/>)
) : null }
{(!uris || uris.length === 0) &&
<View style={searchStyle.noResults}>
<Text style={searchStyle.noResultsText}>There are no results to display for <Text style={searchStyle.boldText}>{query}</Text>. Please try a different search term.</Text>
</View>}
</ScrollView>}
<FloatingWalletBalance navigation={navigation} />
</View>

View file

@ -8,7 +8,7 @@ const searchStyle = StyleSheet.create({
},
scrollContainer: {
flex: 1,
marginTop: 60
marginTop: 60,
},
busyContainer: {
flex: 1,
@ -16,6 +16,7 @@ const searchStyle = StyleSheet.create({
justifyContent: 'center'
},
scrollPadding: {
flex: 1,
paddingBottom: 16
},
resultItem: {
@ -27,7 +28,6 @@ const searchStyle = StyleSheet.create({
marginRight: 8
},
featuredResultItem: {
flex: 1,
flexDirection: 'row',
justifyContent: 'space-between',
paddingTop: 8,
@ -42,11 +42,22 @@ const searchStyle = StyleSheet.create({
fontFamily: 'Inter-UI-Regular',
fontSize: 16
},
noResults: {
flex: 1,
width: '100%',
height: '100%',
justifyContent: 'center',
alignItems: 'center'
},
noResultsText: {
textAlign: 'center',
fontFamily: 'Inter-UI-Regular',
fontSize: 14,
position: 'absolute'
fontSize: 16,
marginLeft: 16,
marginRight: 16
},
boldText: {
fontFamily: 'Inter-UI-SemiBold',
fontSize: 16
},
loading: {
position: 'absolute'

View file

@ -19,13 +19,13 @@ const uriBarStyle = StyleSheet.create({
elevation: 4
},
uriText: {
backgroundColor: Colors.White,
borderWidth: 1,
borderColor: Colors.LightGrey,
padding: 8,
borderRadius: 4,
backgroundColor: Colors.VeryLightGrey,
borderRadius: 24,
paddingLeft: 12,
paddingRight: 12,
fontFamily: 'Inter-UI-Regular',
fontSize: 16,
lineHeight: 18,
flex: 17
},
overlay: {