├── Button ├── AppButton.js └── README.md ├── CreatePdf ├── ExportPdf.js └── README.md ├── Header ├── AppHeader.js └── README.md ├── Linking ├── README.md └── index.js ├── List ├── README.md └── VirtualizedList.tsx ├── ModalView ├── ModalView.js └── README.md ├── README.md └── screenshots ├── header1.jpg ├── header2.jpg ├── header3.jpg └── rounded_button.png /Button/AppButton.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import { View, Text, TouchableOpacity, StyleSheet, ActivityIndicator } from 'react-native' 3 | import Feather from 'react-native-vector-icons/Feather'; 4 | import LinearGradient from 'react-native-linear-gradient'; 5 | 6 | /** 7 | * can use 8 | * + 9 | * at the place of Feather icon*/ 10 | 11 | export const RoundButton = ({ colors, onPress, style, iconSize = 30, bottom = 0, right = 0, icon = "plus", iconColor = 'black', backgroundColor = "white" }) => { 12 | const ButtonView = colors && colors.length > 1 ? LinearGradient : View 13 | const Icon = () => 14 | return ( 15 | 16 | 17 | 20 | 21 | 22 | 23 | 24 | ) 25 | } 26 | 27 | export const Button = ({ label, onPress, colors, disabled = false, style, labelStyle, icon, loading, iconColor, iconSize = 20, fontSize = 18, textColor = 'white', }) => { 28 | const ButtonView = colors && colors.length > 1 ? LinearGradient : View 29 | const Icon = () => 30 | const TextView = () => {label} 31 | return ( 32 | 33 | 36 | {!loading && icon && } 37 | {!loading && label && } 38 | {loading && } 39 | 40 | 41 | ) 42 | } 43 | 44 | 45 | const styles = StyleSheet.create({ 46 | button: { 47 | width: 100, 48 | minHeight: 45, 49 | padding: 10, 50 | borderRadius: 10, 51 | flexDirection: 'row', 52 | alignItems: 'center', 53 | justifyContent: 'center', 54 | backgroundColor: '#0091d9', 55 | }, 56 | text: { 57 | color: 'white', 58 | paddingHorizontal: 10, 59 | }, 60 | roundButton: { 61 | width: 56, 62 | height: 56, 63 | margin: 16, 64 | borderRadius: 30, 65 | shadowOffset: { width: 2, height: 0 }, 66 | shadowColor: '#000', 67 | shadowOpacity: 0.6, 68 | shadowRadius: 0.6, 69 | elevation: 10, 70 | zIndex: 999, 71 | }, 72 | btnView: { 73 | width: 56, 74 | height: 56, 75 | borderRadius: 30, 76 | alignItems: 'center', 77 | justifyContent: 'center', 78 | } 79 | }) -------------------------------------------------------------------------------- /Button/README.md: -------------------------------------------------------------------------------- 1 | # react-native 2 | 3 | clone the module and add on any react-native or expo project. 4 | ### use custom Button with icon, title and loading 5 | 6 | ### install required dependency 7 | ``` 8 | npm i react-native-paper react-native-vector-icons 9 | link vector icons 10 | react-native link react-native-vector-icons 11 | ``` 12 | Button usage: 13 | ``` 14 | import {Button, RoundButton} from './components/AppButton'; 15 | 16 |