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
// src/components/Loading/index.js | |
import React from "react"; | |
import { ActivityIndicator, Platform } from "react-native"; | |
import Modal from "../Modal"; | |
const Loading = ({ onDismiss, visible, onRequestClose }) => ( | |
<Modal | |
visible={visible} |
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
// src/components/Modal/index.js | |
import React from "react"; | |
import { Modal, View } from "react-native"; | |
const ModalView = ({ visible, onDismiss, children, onRequestClose }) => ( | |
<Modal | |
visible={visible} | |
onDismiss={onDismiss} | |
transparent |
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
// src/components/Gradient/index.js | |
// contoh disini dengan gambar | |
import React from "react"; | |
import { ImageBackground, StatusBar } from "react-native"; | |
const Gradient = ({ children, style }) => ( | |
<ImageBackground | |
source={require("../../assets/img/bg.png")} | |
style={style} |
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
// src/components/FormInput/index.js | |
import React from "react"; | |
import { TextInput, View } from "react-native"; | |
const FormInput = ({ secureTextEntry, ...props }) => ( | |
<View style={styles.container}> | |
<TextInput | |
style={styles.textInput} | |
secureTextEntry={secureTextEntry} |
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
// src/components/Button/index.js | |
import React from "react"; | |
import { TouchableOpacity, Text } from "react-native"; | |
const Button = ({ onPress, style, title, ...props }) => ( | |
<TouchableOpacity | |
{...props} | |
onPress={onPress} | |
style={[styles.container, style]} | |
> |
NewerOlder