1.0.7 • Published 2 years ago

rn-profile-screen v1.0.7

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

rn-profile-screen A customizable profile screen component for React Native projects. Use this open source library in your fresh React Native project for instant startup.

Table of Contents

Installation

To use rn-profile-screen in your React Native project, simply install it using npm or yarn:

npm install rn-profile-screen
or
yarn add rn-profile-screen

Usage

To use the profile screen component in your app, import it from the rn-profile-screen package and render it as the second component in your app after splash screen. You can customize the appearance and behavior of the profile screen by passing in props.

How to use

import ProfileScreen from "rn-profile-screen";

function App() {
  return (
    <ProfileScreen
      source={require("./src/assets/back.png")}
      source1={require("./src/assets/pencil.png")}
      profileSource={require("./src/assets/profile.png")}
      phoneSource={require("./src/assets/phone.png")}
      emailSource={require("./src/assets/email.png")}
      HeadingText={"Emma Phillips"}
      HeadingText1={"Fashion Modal"}
      phoneNumberText={"(581)-307-6902"}
      emailText={"emma.phillips@gmail.com"}
      WalletPrice={"$140.00"}
      WalletText={"Wallet"}
      OrderPrice={"12"}
      OrderText={"Orders"}
      TabItem={6}
      texts={[
        {
          text: "Your Favorites",
          onPress: () => console.log("Your Favorites pressed"),
        },
        { text: "Payment", onPress: () => console.log("Payment pressed") },
        {
          text: "Tell Your Friend",
          onPress: () => console.log("Tell Your Friend pressed"),
        },
        {
          text: "Promotions",
          onPress: () => console.log("Promotions pressed"),
        },
        { text: "Settings", onPress: () => console.log("Settings pressed") },
        { text: "Log Out", onPress: () => console.log("Log Out pressed") },
      ]}
      TabImages={[
        require("./src/assets/like.png"),
        require("./src/assets/wallet.png"),
        require("./src/assets/add-friend.png"),
        require("./src/assets/promotion.png"),
        require("./src/assets/setting.png"),
        require("./src/assets/turn-off.png"),
        "https://images.unsplash.com/photo-1503023345310-bd7c1de61c7d?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8aHVtYW58ZW58MHx8MHx8&w=1000&q=80",
        "https://media.istockphoto.com/id/517188688/photo/mountain-landscape.jpg?s=612x612&w=0&k=20&c=A63koPKaCyIwQWOTFBRWXj_PwCrR4cEoOw2S9Q7yVl8=",
        "https://images.unsplash.com/photo-1503023345310-bd7c1de61c7d?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8aHVtYW58ZW58MHx8MHx8&w=1000&q=80",
        "https://images.unsplash.com/photo-1503023345310-bd7c1de61c7d?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mnx8aHVtYW58ZW58MHx8MHx8&w=1000&q=80",
        "https://media.istockphoto.com/id/517188688/photo/mountain-landscape.jpg?s=612x612&w=0&k=20&c=A63koPKaCyIwQWOTFBRWXj_PwCrR4cEoOw2S9Q7yVl8=",
        "https://media.istockphoto.com/id/517188688/photo/mountain-landscape.jpg?s=612x612&w=0&k=20&c=A63koPKaCyIwQWOTFBRWXj_PwCrR4cEoOw2S9Q7yVl8=",
      ]}
      usePhoneLogo={true}
      useEmailLogo={true}
    />
  );
}

Props

The ProfileScreen component accepts the following props:

Prop NameData TypeDescription
HeadingTextanymain heading
-----------------------------
HeadingText1anymain heading
-----------------------------
sourcespecified path(req)Image source
-----------------------------
source1specified path(req)Image source
-----------------------------
profileSourcespecified path(req)Profile Image source
-----------------------------
emailSourcespecified path(req)Profile Image source
-----------------------------
phoneNumberTextanyYour phoneNumberText Text
-----------------------------
emailTextanyYour Email Text
-----------------------------
loginPressanyonPress for login
-----------------------------
SignUpPressanyonPress for signUp
-----------------------------
WalletPriceanyYour Wallet Price
-----------------------------
WalletTextanyYour Order Price
-----------------------------
OrderTextanyYour Order Text
-----------------------------
TabItemanyYour Tab Item
-----------------------------
usePhoneLogoboolUsing Phone Logo or not
-----------------------------
useEmailLogoboolUsing Email Logo or not
-----------------------------
textsanyYour Tab Texts
-----------------------------
TabImagesspecified path(req)TabImages Source
-----------------------------
WalletPriceStyleanyWallet Price Style
-----------------------------
WalletTextStyleanyWallet Text Style
-----------------------------
OrderPriceStyleanyOrder Price Style
-----------------------------
OrderTextStyleanyOrder Text Style
-----------------------------
phoneNumberTextStyleanyPhoneNumber Text Style
-----------------------------
EmailTextStyleanyEmail Text Style
-----------------------------
imageMailStyleanyImage Mail Style
-----------------------------
imagePhoneStyleanyImage Phone Style
-----------------------------
profileImageStyleanyProfile Image Style
-----------------------------
imagePencileStyleanyImage Pencile Style
-----------------------------
imageStyleanyImage Style
-----------------------------
HeadingTextStyleanyHeading Text Style
-----------------------------
HeadingTextStyle1anyHeading Text Style1
-----------------------------
imageTabStyleanyImage Tab Style
-----------------------------
viewStyleanyView Style
-----------------------------
onPressanyonPress for Tabs

Contributors

We would like to thank the following developers for their contributions to this project:

To all our contributors, thank you for your hard work and dedication!

License

This package is released under the MIT License.

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago