Skip to content

Commit 148c6d5

Browse files
committed
initial release of giphy modal
0 parents  commit 148c6d5

85 files changed

Lines changed: 17975 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
**/node_modules
2+
example/
3+
lib/

.eslintrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
extends: ['@react-native-community', 'plugin:prettier/recommended'],
3+
plugins: ['simple-import-sort'],
4+
root: true,
5+
rules: {
6+
'import/order': 'off',
7+
'simple-import-sort/exports': 'error',
8+
'simple-import-sort/imports': 'error',
9+
'sort-imports': 'off',
10+
},
11+
}

.gitignore

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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+
project.xcworkspace
24+
25+
# Android/IntelliJ
26+
#
27+
build/
28+
.idea
29+
.gradle
30+
local.properties
31+
*.iml
32+
/android/gradlew
33+
/android/gradlew.bat
34+
/android/gradle/
35+
36+
# Visual Studio Code
37+
#
38+
.vscode/
39+
40+
# node.js
41+
#
42+
node_modules/
43+
npm-debug.log
44+
yarn-error.log
45+
46+
# BUCK
47+
buck-out/
48+
\.buckd/
49+
*.keystore
50+
!debug.keystore
51+
52+
# fastlane
53+
#
54+
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
55+
# screenshots whenever they are needed.
56+
# For more information about the recommended setup visit:
57+
# https://docs.fastlane.tools/best-practices/source-control/
58+
59+
*/fastlane/report.xml
60+
*/fastlane/Preview.html
61+
*/fastlane/screenshots
62+
63+
# Bundle artifact
64+
*.jsbundle
65+
66+
# CocoaPods
67+
/ios/Pods/
68+
69+
# Library
70+
lib/

.prettierrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
jsxSingleQuote: true,
3+
semi: false,
4+
singleQuote: true,
5+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Damit Amarasinghe
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
# React Native Giphy Modal
2+
3+
## Giphy modal to select gif made using Giphy Api.
4+
5+
<br/>
6+
7+
<img src="./screen/1_react-native-giphy-modal.gif" height="400">
8+
<br/>
9+
<br/>
10+
11+
- [Features](#user-content-Features)
12+
- [Installation](#user-content-Installation)
13+
- [Usage](#user-content-Usage)
14+
- [Props](#user-content-props)
15+
- [Coming soon Features](#user-content-Coming-soon-Features)
16+
17+
<br/>
18+
19+
## Features
20+
21+
- Infinity Scrolling
22+
- [Trending Giphy](https://developers.giphy.com/docs/api/endpoint#trending)
23+
- [Search Giphy](https://developers.giphy.com/docs/api/endpoint#search)
24+
25+
## Installation
26+
27+
<br/>
28+
29+
```shell
30+
$ npm install react-native-giphy-modal
31+
```
32+
33+
### Dependencies
34+
35+
This library needs these dependencies to be installed in your project before you can use it:
36+
37+
```shell
38+
$ npm install yarn add react-native-reanimated react-native-gesture-handler
39+
```
40+
41+
#### INFO
42+
43+
React Native Gesture Handler needs extra steps to finalize its installation, please follow their [installation instructions](https://docs.swmansion.com/react-native-gesture-handler/docs/#installation).
44+
45+
React Native Reanimated v1 needs extra steps to finalize its installation, please follow their [installation instructions](https://docs.swmansion.com/react-native-reanimated/docs/1.x.x/getting_started/).
46+
47+
To work on Android you need to follow react native [instruction](https://reactnative.dev/docs/image#gif-and-webp-support-on-android).
48+
49+
<br/>
50+
51+
## Usage
52+
53+
<br/>
54+
55+
```jsx
56+
import GiphyModal from 'react-native-giphy-modal'
57+
58+
<GiphyModal
59+
ref={giphyModalRef}
60+
giphyApiKey={''}
61+
onSelectGif={(gifDetail) => {}}
62+
/>
63+
```
64+
65+
## Props
66+
67+
<br/>
68+
69+
#### `giphyApiKey`(required)
70+
71+
Api key of Giphy you can get an one https://developers.giphy.com.
72+
73+
#### `onSelectGif`
74+
75+
When you onPress on gift this method will get fired.
76+
77+
<br/>
78+
79+
## Coming soon Features
80+
81+
<br/>
82+
83+
- Source code Javascript to TypeScript
84+
- Custom Layout
85+
- Dark Mode theming
86+
87+
<br/>
88+
89+
## Built With ❤️
90+
91+
92+
- [React Native Bottom Sheet](https://gorhom.github.io/react-native-bottom-sheet/)
93+
- [React Native Module Template](https://github.com/demchenkoalex/react-native-module-template)
94+
95+
<br/>
96+
97+
## Author
98+
- Damith G (http://damithg.dev/)

babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: ['module:metro-react-native-babel-preset'],
3+
}

example/.buckconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
[android]
3+
target = Google Inc.:Google APIs:23
4+
5+
[maven_repositories]
6+
central = https://repo1.maven.org/maven2

example/.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
**/node_modules

example/.eslintrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
extends: ['@react-native-community', 'plugin:prettier/recommended'],
3+
plugins: ['simple-import-sort'],
4+
root: true,
5+
rules: {
6+
'import/order': 'off',
7+
'simple-import-sort/exports': 'error',
8+
'simple-import-sort/imports': 'error',
9+
'sort-imports': 'off',
10+
},
11+
}

0 commit comments

Comments
 (0)