Skip to content

Instantly share code, notes, and snippets.

@cgibsonmm
Created January 5, 2020 15:24
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 cgibsonmm/5703e34445445438c9bf5bfd3f2bf352 to your computer and use it in GitHub Desktop.
Save cgibsonmm/5703e34445445438c9bf5bfd3f2bf352 to your computer and use it in GitHub Desktop.
Bottom Nav for instagram clone
import React from 'react';
import { Link } from 'react-router-native';
import { View, TouchableOpacity} from 'react-native';
import { t } from 'react-native-tailwindcss';
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome';
import {
faHome,
faSearch,
faUser,
faHeart,
faPlusSquare
} from '@fortawesome/free-solid-svg-icons';
export default BottomNav = () => {
return (
<View style={[t.absolute, t.bottom0, t.flex, t.flexRow, t.bgGray500 ]}>
<Link to="/" style={[t.flex1]}component={TouchableOpacity}>
<View style={[t.p8,t.flex1]}>
<FontAwesomeIcon size={20} icon={faHome}/>
</View>
</Link>
<Link to="/search" style={[t.flex1]}component={TouchableOpacity}>
<View style={[t.p8,t.flex1]}>
<FontAwesomeIcon size={20} icon={faSearch}/>
</View>
</Link>
<Link to="/addPhoto" style={[t.flex1]}component={TouchableOpacity}>
<View style={[t.p8,t.flex1]}>
<FontAwesomeIcon size={20} icon={faPlusSquare}/>
</View>
</Link>
<Link to="/likes" style={[t.flex1]}component={TouchableOpacity}>
<View style={[t.p8,t.flex1]}>
<FontAwesomeIcon size={20} icon={faHeart}/>
</View>
</Link>
<Link to="/myPhotos" style={[t.flex1]}component={TouchableOpacity}>
<View style={[t.p8, t.flex1]}>
<FontAwesomeIcon size={20} icon={faUser}/>
</View>
</Link>
</View>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment