Skip to content

Commit 2f2e756

Browse files
committed
Gorgeous Header is here 🥳
1 parent 58d6ded commit 2f2e756

24 files changed

+178
-604
lines changed

README.md

+30-4
Original file line numberDiff line numberDiff line change
@@ -43,26 +43,35 @@ npm i @freakycoder/react-native-header-view
4343

4444
# Options
4545

46+
- GorgeousHeader
4647
- AppleHeader
4748
- ModernHeader
4849
- ClassicHeader
4950

5051
# Usage
5152

53+
## Gorgeous Header Usage
54+
55+
```jsx
56+
import { Gorgeous } from "@freakycoder/react-native-header-view";
57+
58+
<Gorgeous onChangeText={(text) => console.log(text)} />;
59+
```
60+
5261
## Apple Header Usage
5362

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

57-
<AppleHeader />
66+
<AppleHeader />;
5867
```
5968

6069
## Modern Header Usage
6170

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

65-
<ModernHeader />
74+
<ModernHeader />;
6675
```
6776

6877
#### Advanced Usage
@@ -79,7 +88,7 @@ import { ModernHeader } from "@freakycoder/react-native-header-view";
7988
leftIconComponent={your - icon - component}
8089
rightIconComponent={your - icon - component}
8190
leftIconOnPress={() => NavigationService.back()}
82-
/>
91+
/>;
8392
```
8493

8594
## Classic Header Usage
@@ -119,11 +128,28 @@ import { ClassicHeader } from "@freakycoder/react-native-header-view";
119128
<Icon name="github" type="AntDesign" size={30} color="purple" />
120129
</TouchableOpacity>
121130
}
122-
/>
131+
/>;
123132
```
124133

125134
# Configuration - Props
126135

136+
## Gorgeous Header Props
137+
138+
| Property | Type | Default | Description |
139+
| ------------------- | :------: | :----------------------------: | ----------------------------------------------------------------------- |
140+
| title | string | Order | change the title |
141+
| subtitle | string | Healthy food can keep you fit. | change the subtitle |
142+
| searchIcon | asset | default | set your own icon for the search one |
143+
| titleTextStyle | style | default | set your own style for title text |
144+
| subtitleTextStyle | style | default | set your own style for subtitle text |
145+
| searchInputStyle | style | default | set your own style for search text input |
146+
| menuImageStyle | style | default | set your own style for hamburger menu image |
147+
| menuImageSource | asset | default | set your own image instead of default hamburger menu image |
148+
| menuImageOnPress | function | undefined | use this to set your own function for pressing the hamburger menu image |
149+
| profileImageStyle | style | default | set your own style for profile image |
150+
| profileImageSource | asset | undefined | use this to set your own image for profile image |
151+
| profileImageOnPress | function | undefined | use this to set your own function for pressing the profile image |
152+
127153
## Apple Header Props
128154

129155
| Property | Type | Default | Description |

example/App.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
import React, { Fragment } from "react";
22
import {
3+
Linking,
34
StatusBar,
45
SafeAreaView,
56
TouchableOpacity,
6-
Linking,
77
} from "react-native";
88
import {
99
AppleHeader,
1010
ModernHeader,
1111
ClassicHeader,
12+
GorgeousHeader,
1213
} from "@freakycoder/react-native-header-view";
1314
import Icon from "react-native-dynamic-vector-icons";
1415

15-
import GorgeousHeader from "./lib/src/components/GorgeousHeader/GorgeousHeader";
16-
1716
const App = () => {
1817
return (
1918
<Fragment>
@@ -33,7 +32,7 @@ const App = () => {
3332
/> */}
3433
{/* <ModernHeader /> */}
3534
{/* <AppleHeader /> */}
36-
<GorgeousHeader />
35+
<GorgeousHeader onChangeText={(text) => console.log(text)} />
3736
</SafeAreaView>
3837
</Fragment>
3938
);

example/ios/Podfile.lock

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
PODS:
22
- boost-for-react-native (1.63.0)
3+
- BVLinearGradient (2.5.6):
4+
- React
35
- DoubleConversion (1.1.6)
46
- FBLazyVector (0.61.4)
57
- FBReactNativeSpec (0.61.4):
@@ -222,6 +224,7 @@ PODS:
222224
- Yoga (1.14.0)
223225

224226
DEPENDENCIES:
227+
- BVLinearGradient (from `../node_modules/react-native-linear-gradient`)
225228
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
226229
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
227230
- FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`)
@@ -257,6 +260,8 @@ SPEC REPOS:
257260
- boost-for-react-native
258261

259262
EXTERNAL SOURCES:
263+
BVLinearGradient:
264+
:path: "../node_modules/react-native-linear-gradient"
260265
DoubleConversion:
261266
:podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec"
262267
FBLazyVector:
@@ -312,6 +317,7 @@ EXTERNAL SOURCES:
312317

313318
SPEC CHECKSUMS:
314319
boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c
320+
BVLinearGradient: e3aad03778a456d77928f594a649e96995f1c872
315321
DoubleConversion: 5805e889d232975c086db112ece9ed034df7a0b2
316322
FBLazyVector: feb35a6b7f7b50f367be07f34012f34a79282fa3
317323
FBReactNativeSpec: 51477b84b1bf7ab6f9ef307c24e3dd675391be44

example/ios/example.xcodeproj/xcshareddata/xcschemes/example.xcscheme

+9-13
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@
5555
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
5656
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
5757
shouldUseLaunchSchemeArgsEnv = "YES">
58+
<MacroExpansion>
59+
<BuildableReference
60+
BuildableIdentifier = "primary"
61+
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
62+
BuildableName = "example.app"
63+
BlueprintName = "example"
64+
ReferencedContainer = "container:example.xcodeproj">
65+
</BuildableReference>
66+
</MacroExpansion>
5867
<Testables>
5968
<TestableReference
6069
skipped = "NO">
@@ -67,17 +76,6 @@
6776
</BuildableReference>
6877
</TestableReference>
6978
</Testables>
70-
<MacroExpansion>
71-
<BuildableReference
72-
BuildableIdentifier = "primary"
73-
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
74-
BuildableName = "example.app"
75-
BlueprintName = "example"
76-
ReferencedContainer = "container:example.xcodeproj">
77-
</BuildableReference>
78-
</MacroExpansion>
79-
<AdditionalOptions>
80-
</AdditionalOptions>
8179
</TestAction>
8280
<LaunchAction
8381
buildConfiguration = "Debug"
@@ -99,8 +97,6 @@
9997
ReferencedContainer = "container:example.xcodeproj">
10098
</BuildableReference>
10199
</BuildableProductRunnable>
102-
<AdditionalOptions>
103-
</AdditionalOptions>
104100
</LaunchAction>
105101
<ProfileAction
106102
buildConfiguration = "Release"

example/lib/local-assets/menu-1.png

-3.76 KB
Binary file not shown.

example/lib/local-assets/menu.png

-3.73 KB
Binary file not shown.
-1.41 MB
Binary file not shown.

example/lib/local-assets/search.png

-19.7 KB
Binary file not shown.

example/lib/src/components/AppleHeader/AppleHeader.js

-92
This file was deleted.

example/lib/src/components/AppleHeader/AppleHeader.style.js

-46
This file was deleted.

0 commit comments

Comments
 (0)