Skip to content

Commit

Permalink
Gorgeous Header is here 🥳
Browse files Browse the repository at this point in the history
  • Loading branch information
WrathChaos committed Apr 5, 2020
1 parent 58d6ded commit 2f2e756
Show file tree
Hide file tree
Showing 24 changed files with 178 additions and 604 deletions.
34 changes: 30 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,26 +43,35 @@ npm i @freakycoder/react-native-header-view

# Options

- GorgeousHeader
- AppleHeader
- ModernHeader
- ClassicHeader

# Usage

## Gorgeous Header Usage

```jsx
import { Gorgeous } from "@freakycoder/react-native-header-view";

<Gorgeous onChangeText={(text) => console.log(text)} />;
```

## Apple Header Usage

```jsx
import { AppleHeader } from "@freakycoder/react-native-header-view";

<AppleHeader />
<AppleHeader />;
```

## Modern Header Usage

```jsx
import { ModernHeader } from "@freakycoder/react-native-header-view";

<ModernHeader />
<ModernHeader />;
```

#### Advanced Usage
Expand All @@ -79,7 +88,7 @@ import { ModernHeader } from "@freakycoder/react-native-header-view";
leftIconComponent={your - icon - component}
rightIconComponent={your - icon - component}
leftIconOnPress={() => NavigationService.back()}
/>
/>;
```

## Classic Header Usage
Expand Down Expand Up @@ -119,11 +128,28 @@ import { ClassicHeader } from "@freakycoder/react-native-header-view";
<Icon name="github" type="AntDesign" size={30} color="purple" />
</TouchableOpacity>
}
/>
/>;
```

# Configuration - Props

## Gorgeous Header Props

| Property | Type | Default | Description |
| ------------------- | :------: | :----------------------------: | ----------------------------------------------------------------------- |
| title | string | Order | change the title |
| subtitle | string | Healthy food can keep you fit. | change the subtitle |
| searchIcon | asset | default | set your own icon for the search one |
| titleTextStyle | style | default | set your own style for title text |
| subtitleTextStyle | style | default | set your own style for subtitle text |
| searchInputStyle | style | default | set your own style for search text input |
| menuImageStyle | style | default | set your own style for hamburger menu image |
| menuImageSource | asset | default | set your own image instead of default hamburger menu image |
| menuImageOnPress | function | undefined | use this to set your own function for pressing the hamburger menu image |
| profileImageStyle | style | default | set your own style for profile image |
| profileImageSource | asset | undefined | use this to set your own image for profile image |
| profileImageOnPress | function | undefined | use this to set your own function for pressing the profile image |

## Apple Header Props

| Property | Type | Default | Description |
Expand Down
7 changes: 3 additions & 4 deletions example/App.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
import React, { Fragment } from "react";
import {
Linking,
StatusBar,
SafeAreaView,
TouchableOpacity,
Linking,
} from "react-native";
import {
AppleHeader,
ModernHeader,
ClassicHeader,
GorgeousHeader,
} from "@freakycoder/react-native-header-view";
import Icon from "react-native-dynamic-vector-icons";

import GorgeousHeader from "./lib/src/components/GorgeousHeader/GorgeousHeader";

const App = () => {
return (
<Fragment>
Expand All @@ -33,7 +32,7 @@ const App = () => {
/> */}
{/* <ModernHeader /> */}
{/* <AppleHeader /> */}
<GorgeousHeader />
<GorgeousHeader onChangeText={(text) => console.log(text)} />
</SafeAreaView>
</Fragment>
);
Expand Down
6 changes: 6 additions & 0 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
PODS:
- boost-for-react-native (1.63.0)
- BVLinearGradient (2.5.6):
- React
- DoubleConversion (1.1.6)
- FBLazyVector (0.61.4)
- FBReactNativeSpec (0.61.4):
Expand Down Expand Up @@ -222,6 +224,7 @@ PODS:
- Yoga (1.14.0)

DEPENDENCIES:
- BVLinearGradient (from `../node_modules/react-native-linear-gradient`)
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
- FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`)
Expand Down Expand Up @@ -257,6 +260,8 @@ SPEC REPOS:
- boost-for-react-native

EXTERNAL SOURCES:
BVLinearGradient:
:path: "../node_modules/react-native-linear-gradient"
DoubleConversion:
:podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
FBLazyVector:
Expand Down Expand Up @@ -312,6 +317,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872
DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
FBLazyVector: feb35a6b7f7b50f367be07f34012f34a79282fa3
FBReactNativeSpec: 51477b84b1bf7ab6f9ef307c24e3dd675391be44
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "example.app"
BlueprintName = "example"
ReferencedContainer = "container:example.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -67,17 +76,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
BuildableName = "example.app"
BlueprintName = "example"
ReferencedContainer = "container:example.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -99,8 +97,6 @@
ReferencedContainer = "container:example.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
Binary file removed example/lib/local-assets/menu-1.png
Binary file not shown.
Binary file removed example/lib/local-assets/menu.png
Binary file not shown.
Binary file removed example/lib/local-assets/omid-armin-unsplash.jpg
Binary file not shown.
Binary file removed example/lib/local-assets/search.png
Binary file not shown.
92 changes: 0 additions & 92 deletions example/lib/src/components/AppleHeader/AppleHeader.js

This file was deleted.

46 changes: 0 additions & 46 deletions example/lib/src/components/AppleHeader/AppleHeader.style.js

This file was deleted.

Loading

0 comments on commit 2f2e756

Please sign in to comment.