├── .eslintignore ├── .prettierignore ├── .gitattributes ├── assets ├── logo.png └── Screenshots │ └── React-Native-Apple-Header.png ├── example ├── assets │ ├── icon.png │ ├── splash.png │ ├── favicon.png │ └── adaptive-icon.png ├── tsconfig.json ├── babel.config.js ├── .gitignore ├── package.json ├── App.tsx ├── app.json └── lib │ ├── AppleHeader.style.ts │ └── AppleHeader.tsx ├── .husky ├── commit-msg └── pre-commit ├── .npmignore ├── .prettierrc ├── .commitlintrc.json ├── CHANGELOG.md ├── .gitignore ├── tsconfig.json ├── lib ├── AppleHeader.style.ts └── AppleHeader.tsx ├── package.json ├── .eslintrc.js └── README.md /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules/** -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules/** -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathChaos/react-native-apple-header/HEAD/assets/logo.png -------------------------------------------------------------------------------- /example/assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathChaos/react-native-apple-header/HEAD/example/assets/icon.png -------------------------------------------------------------------------------- /.husky/commit-msg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npx --no-install commitlint --edit 5 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npm run prettier 5 | npm run lint 6 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # Node Modules 2 | **/node_modules 3 | node_modules 4 | # Example 5 | example 6 | # Assets 7 | Assets 8 | assets -------------------------------------------------------------------------------- /example/assets/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathChaos/react-native-apple-header/HEAD/example/assets/splash.png -------------------------------------------------------------------------------- /example/assets/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathChaos/react-native-apple-header/HEAD/example/assets/favicon.png -------------------------------------------------------------------------------- /example/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "expo/tsconfig.base", 3 | "compilerOptions": { 4 | "strict": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /example/assets/adaptive-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathChaos/react-native-apple-header/HEAD/example/assets/adaptive-icon.png -------------------------------------------------------------------------------- /example/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = function(api) { 2 | api.cache(true); 3 | return { 4 | presets: ['babel-preset-expo'], 5 | }; 6 | }; 7 | -------------------------------------------------------------------------------- /assets/Screenshots/React-Native-Apple-Header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WrathChaos/react-native-apple-header/HEAD/assets/Screenshots/React-Native-Apple-Header.png -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "bracketSpacing": true, 3 | "jsxBracketSameLine": false, 4 | "singleQuote": false, 5 | "trailingComma": "all", 6 | "tabWidth": 2, 7 | "semi": true 8 | } 9 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .expo/ 3 | dist/ 4 | npm-debug.* 5 | *.jks 6 | *.p8 7 | *.p12 8 | *.key 9 | *.mobileprovision 10 | *.orig.* 11 | web-build/ 12 | 13 | # macOS 14 | .DS_Store 15 | -------------------------------------------------------------------------------- /.commitlintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["@commitlint/config-conventional"], 3 | "rules": { 4 | "header-max-length": [0, "always", 150], 5 | "subject-case": [0, "always", "sentence-case"], 6 | "type-enum": [ 7 | 2, 8 | "always", 9 | [ 10 | "ci", 11 | "chore", 12 | "docs", 13 | "feat", 14 | "fix", 15 | "perf", 16 | "refactor", 17 | "revert", 18 | "style", 19 | "test" 20 | ] 21 | ] 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [0.1.1](https://github.com/WrathChaos/react-native-apple-header/tree/0.1.1) (2020-08-23) 4 | 5 | [Full Changelog](https://github.com/WrathChaos/react-native-apple-header/compare/0.1.0...0.1.1) 6 | 7 | ## [0.1.0](https://github.com/WrathChaos/react-native-apple-header/tree/0.1.0) (2020-08-22) 8 | 9 | [Full Changelog](https://github.com/WrathChaos/react-native-apple-header/compare/7ba98842fe311d3d41356652c428c28c286d6360...0.1.0) 10 | 11 | \* _This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)_ 12 | -------------------------------------------------------------------------------- /example/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "version": "1.0.0", 4 | "main": "node_modules/expo/AppEntry.js", 5 | "scripts": { 6 | "start": "expo start", 7 | "android": "expo start --android", 8 | "ios": "expo start --ios", 9 | "web": "expo start --web" 10 | }, 11 | "dependencies": { 12 | "expo": "~47.0.12", 13 | "expo-status-bar": "~1.4.2", 14 | "react": "18.1.0", 15 | "react-dom": "18.1.0", 16 | "react-native": "0.70.5", 17 | "react-native-web": "~0.18.9" 18 | }, 19 | "devDependencies": { 20 | "@babel/core": "^7.12.9", 21 | "@types/react": "~18.0.14", 22 | "@types/react-native": "~0.70.6", 23 | "typescript": "^4.6.3" 24 | }, 25 | "private": true 26 | } 27 | -------------------------------------------------------------------------------- /example/App.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { SafeAreaView, StatusBar } from "react-native"; 3 | import AppleHeader from "./lib/AppleHeader"; 4 | // ? Assets 5 | const profileImageSource = 6 | "https://images.unsplash.com/photo-1504730030853-eff311f57d3c?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=934&q=80"; 7 | 8 | const App = () => { 9 | return ( 10 | <> 11 | 12 | 13 | {}} 20 | /> 21 | 22 | 23 | ); 24 | }; 25 | 26 | export default App; 27 | -------------------------------------------------------------------------------- /example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "name": "example", 4 | "slug": "example", 5 | "version": "1.0.0", 6 | "orientation": "portrait", 7 | "icon": "./assets/icon.png", 8 | "userInterfaceStyle": "light", 9 | "splash": { 10 | "image": "./assets/splash.png", 11 | "resizeMode": "contain", 12 | "backgroundColor": "#ffffff" 13 | }, 14 | "updates": { 15 | "fallbackToCacheTimeout": 0 16 | }, 17 | "assetBundlePatterns": [ 18 | "**/*" 19 | ], 20 | "ios": { 21 | "supportsTablet": true 22 | }, 23 | "android": { 24 | "adaptiveIcon": { 25 | "foregroundImage": "./assets/adaptive-icon.png", 26 | "backgroundColor": "#FFFFFF" 27 | } 28 | }, 29 | "web": { 30 | "favicon": "./assets/favicon.png" 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # Xcode 6 | # 7 | build/ 8 | *.pbxuser 9 | !default.pbxuser 10 | *.mode1v3 11 | !default.mode1v3 12 | *.mode2v3 13 | !default.mode2v3 14 | *.perspectivev3 15 | !default.perspectivev3 16 | xcuserdata 17 | *.xccheckout 18 | *.moved-aside 19 | DerivedData 20 | *.hmap 21 | *.ipa 22 | *.xcuserstate 23 | 24 | # Android/IntelliJ 25 | # 26 | build/ 27 | .idea 28 | .gradle 29 | local.properties 30 | *.iml 31 | 32 | # Visual Studio Code 33 | # 34 | .vscode/ 35 | 36 | # node.js 37 | # 38 | node_modules/ 39 | npm-debug.log 40 | yarn-error.log 41 | 42 | # BUCK 43 | buck-out/ 44 | \.buckd/ 45 | *.keystore 46 | !debug.keystore 47 | 48 | # fastlane 49 | # 50 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 51 | # screenshots whenever they are needed. 52 | # For more information about the recommended setup visit: 53 | # https://docs.fastlane.tools/best-practices/source-control/ 54 | 55 | */fastlane/report.xml 56 | */fastlane/Preview.html 57 | */fastlane/screenshots 58 | 59 | # Bundle artifact 60 | *.jsbundle 61 | 62 | # CocoaPods 63 | /ios/Pods/ 64 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "esnext", 4 | "module": "es6", 5 | "lib": ["es6"], 6 | "allowJs": true, 7 | "jsx": "react-native", 8 | "noImplicitAny": false, 9 | "incremental": true /* Enable incremental compilation */, 10 | "isolatedModules": true, 11 | "strict": true, 12 | "moduleResolution": "node", 13 | "baseUrl": "./", 14 | "outDir": "build/dist", 15 | "noEmitHelpers": true, 16 | "alwaysStrict": true, 17 | "strictFunctionTypes": true, 18 | "resolveJsonModule": true, 19 | "importHelpers": false, 20 | "experimentalDecorators": true, 21 | "strictPropertyInitialization": false, 22 | "allowSyntheticDefaultImports": true, 23 | "strictNullChecks": true, 24 | "skipDefaultLibCheck": true, 25 | "skipLibCheck": true, 26 | "esModuleInterop": true, 27 | "typeRoots": ["./node_modules/@types", "./@types"], 28 | "declaration": true /* Generates corresponding '.d.ts' file. */, 29 | "sourceMap": true /* Generates corresponding '.map' file. */ 30 | }, 31 | "exclude": [ 32 | "example", 33 | "example-manual-state", 34 | "node_modules", 35 | "babel.config.js", 36 | "metro.config.js", 37 | "jest.config.js" 38 | ] 39 | } -------------------------------------------------------------------------------- /lib/AppleHeader.style.ts: -------------------------------------------------------------------------------- 1 | import { 2 | ViewStyle, 3 | ImageStyle, 4 | StyleSheet, 5 | Platform, 6 | TextStyle, 7 | } from "react-native"; 8 | 9 | interface Style { 10 | container: ViewStyle; 11 | avatar: ImageStyle; 12 | dateTitleTextStyle: TextStyle; 13 | largeTitleTextStyle: TextStyle; 14 | avatarContainerStyle: ViewStyle; 15 | } 16 | 17 | export default StyleSheet.create