Skip to content

Instantly share code, notes, and snippets.

@vishalnarkhede
Created April 7, 2020 12:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vishalnarkhede/49deb8edb23d2ac07bb075718bb125e0 to your computer and use it in GitHub Desktop.
Save vishalnarkhede/49deb8edb23d2ac07bb075718bb125e0 to your computer and use it in GitHub Desktop.
import React from 'react';
import {Text, TouchableOpacity, Image, StyleSheet} from 'react-native';
export const Giphy = props => {
return (
<TouchableOpacity style={styles.container}>
<Text style={styles.title}>{props.title}</Text>
<Text style={styles.description}>Posted using Giphy.com</Text>
<Image
source={{
url: props.image_url || props.thumb_url,
}}
style={styles.thumbnail}
/>
</TouchableOpacity>
);
};
const styles = StyleSheet.create({
container: {
borderLeftWidth: 5,
borderLeftColor: '#E4E4E4',
paddingLeft: 10,
marginLeft: 10,
marginBottom: 10,
flexDirection: 'column',
},
thumbnail: {
height: 150,
width: 250,
borderRadius: 10,
},
title: {
fontFamily: 'Lato-Regular',
fontWeight: 'bold',
color: '#1E75BE',
padding: 2,
},
description: {
fontFamily: 'Lato-Regular',
padding: 2,
fontSize: 13,
fontWeight: '300',
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment