Skip to content
Snippets Groups Projects
Select Git revision
  • d5ac4b6f6401ded227fa9bf201464e3dc90e874e
  • master default protected
  • 69-resize-image-before-upload
  • 60-add-match-salamander-modal-to-edit-salamander
  • 50-fix-server-error-message
  • 48-fix-gradle
  • 31-camera-communicate-with-api-and-delete-from-cache-2
  • 20-changing-verification-step-in-profile-to-modal
  • 4-add-all-basic-views
  • 1-setup
10 results

AccountData.js

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    AccountData.js 1015 B
    import React from "react";
    import { StyleSheet, Text, View } from "react-native";
    
    /**
     * This component simply shows a user's data. This is used in the ChangeNameScreen component and
     * the ChangeEmailScreen component. 
     * 
     * @param {String} props.currentLabel - bolded text to show label for current <something>
     * @param {String} props.current - text to show current data
     * @param {String} props.newLabel - text to show label for new <something>
     * 
     * @returns the component
     */
    
    const AccountData = (props) => {
      return (
        <View style={styles.container}>
          <Text style={styles.title}>{props.currentLabel}</Text>
          <Text style={styles.data}>{props.current}</Text>
          <Text style={styles.title}>{props.newLabel}</Text>
        </View>
      );
    };
    
    export default AccountData;
    
    const styles = StyleSheet.create({
      title: {
        fontWeight: "bold",
        fontSize: 14,
        marginTop: 5,
      },
      data: {
        fontSize: 16,
        marginTop: 5,
      },
      container: {
        marginStart: 30,
        marginTop: 20,
      },
    });