Skip to content

Commit 8982e63

Browse files
committed
feat: initial commit ✨
0 parents  commit 8982e63

31 files changed

+20746
-0
lines changed

.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Unignore dotfiles
2+
!.*
3+
4+
# Node.js
5+
**/node_modules/
6+
7+
# Compilation artifacts
8+
/dist/

.eslintrc.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/** @type {import('@alkafinance/eslint-config/eslint').ESLintConfig} */
2+
module.exports = {
3+
extends: [
4+
'@alkafinance/eslint-config',
5+
'@alkafinance/eslint-config-typescript',
6+
'@alkafinance/eslint-config-react/native',
7+
'@alkafinance/eslint-config-typescript/react-native',
8+
],
9+
rules: {
10+
// https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin
11+
'@typescript-eslint/no-magic-numbers': 'off',
12+
},
13+
overrides: [
14+
{
15+
files: ['*.js', '**/.*.js'],
16+
...require('@alkafinance/eslint-config/script'),
17+
},
18+
],
19+
};

.github/demo.gif

2.3 MB
Loading

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# macOS
2+
**/.DS_Store
3+
4+
# Node.js
5+
**/node_modules/
6+
**/.yarn-integrity
7+
8+
# Logs
9+
/logs/
10+
**/*.log
11+
**/npm-debug.log*
12+
**/yarn-debug.log*
13+
**/yarn-error.log*
14+
15+
# Compilation artifacts
16+
/dist/
17+
/example/.expo/
18+
19+
# ESLint
20+
/.eslintcache

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Node.js
2+
**/node_modules/
3+
**/package.json

.vscode/extensions.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"editorconfig.editorconfig",
5+
"esbenp.prettier-vscode"
6+
]
7+
}

.vscode/settings.json

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"editor.formatOnSave": false,
3+
"editor.insertSpaces": true,
4+
"editor.rulers": [80],
5+
"editor.tabSize": 2,
6+
"[javascript]": {
7+
"editor.formatOnSave": true
8+
},
9+
"[javascriptreact]": {
10+
"editor.formatOnSave": true
11+
},
12+
"[typescript]": {
13+
"editor.formatOnSave": true
14+
},
15+
"[typescriptreact]": {
16+
"editor.formatOnSave": true
17+
},
18+
"[json]": {
19+
"editor.formatOnSave": true
20+
},
21+
"[jsonc]": {
22+
"editor.formatOnSave": true
23+
},
24+
"[yaml]": {
25+
"editor.formatOnSave": true
26+
},
27+
28+
"files.exclude": {
29+
"**/.git/": true,
30+
"**/.DS_Store": true,
31+
".eslintcache": true
32+
},
33+
"search.exclude": {
34+
"**/node_modules/": true
35+
},
36+
37+
"eslint.nodePath": "./node_modules",
38+
"eslint.options": {
39+
"extensions": [".js", ".ts", ".tsx"],
40+
"rules": {
41+
"padding-line-between-statements": "off"
42+
}
43+
},
44+
"eslint.validate": [
45+
"javascript",
46+
"javascriptreact",
47+
{
48+
"language": "typescript",
49+
"autoFix": true
50+
},
51+
{
52+
"language": "typescriptreact",
53+
"autoFix": true
54+
}
55+
],
56+
57+
"javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false,
58+
"javascript.implicitProjectConfig.checkJs": true,
59+
"javascript.suggestionActions.enabled": false,
60+
"javascript.validate.enable": true,
61+
"typescript.tsdk": "./node_modules/typescript/lib",
62+
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": false,
63+
"typescript.disableAutomaticTypeAcquisition": true,
64+
"typescript.format.enable": false,
65+
"typescript.preferences.quoteStyle": "single",
66+
"typescript.preferences.renameShorthandProperties": true,
67+
68+
"emmet.showExpandedAbbreviation": "never"
69+
}

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2019 Alka, Inc <info@alka.app> (https://alka.app)
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
13+
all 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
21+
THE SOFTWARE.

README.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# @alkafinance/react-native-keyboard-aware-scroll-view
2+
3+
[![npm package](https://img.shields.io/npm/v/@alkafinance/react-native-keyboard-aware-scroll-view.svg)](https://www.npmjs.org/package/@alkafinance/react-native-keyboard-aware-scroll-view)
4+
[![CircleCI Status](https://img.shields.io/circleci/project/github/alkafinance/react-native-keyboard-aware-scroll-view/master.svg)](https://circleci.com/gh/react-native-community/workflows/react-native-netinfo/tree/master)
5+
![Supports Android and iOS](https://img.shields.io/badge/platforms-android%20|%20ios-lightgrey.svg)
6+
![MIT License](https://img.shields.io/npm/l/@alkafinance/react-native-keyboard-aware-scroll-view.svg)
7+
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
8+
9+
A collection of React Native components that respond to the visibility of on-screen keyboard and automatically scroll to the currently focused text input.
10+
11+
<img src="./.github/demo.gif" width="auto" height="640">
12+
13+
## Getting started
14+
15+
`$ npm install @alkafinance/react-native-keyboard-aware-scroll-view --save`
16+
17+
## Usage
18+
19+
Import `KeyboardAwareScrollView`, `KeyboardAwareFlatList`, or `KeyboardAwareSectionList` and use them like the regular `ScrollView`, `FlatList` or `SectionList` components from React Native core. Internally, these components are wrapped in another custom component called `KeyboardAwareContainer`, which is also exported for advanced use cases.
20+
21+
```javascript
22+
import {KeyboardAwareScrollView} from '@alkafinance/react-native-keyboard-aware-scroll-view';
23+
24+
function MyComponent() {
25+
return (
26+
<KeyboardAwareScrollView>
27+
<TextInput />
28+
<TextInput />
29+
<Button />
30+
</TouchableHighlight>
31+
)
32+
}
33+
```
34+
35+
## API
36+
37+
In addition to the regular `ScrollView`, `FlatList` or `SectionList` props, you can also provide the following props for extra customization:
38+
39+
### Props
40+
41+
- [`stickyHeader`](#stickyHeader)
42+
- [`stickyFooter`](#stickyFooter)
43+
- [`containerStyle`](#containerStyle)
44+
45+
---
46+
47+
# Reference
48+
49+
## Props
50+
51+
### `stickyHeader`
52+
53+
Used to display a persisted view above the scrollable content.
54+
55+
| Type | Required |
56+
| ----------------- | -------- |
57+
| `React.ReactNode` | No |
58+
59+
---
60+
61+
### `stickyFooter`
62+
63+
Used to display a persisted view under the scrollable content. Sticky footer is always shown above the keyboard, which could be the desired behaviour for a submit button.
64+
65+
| Type | Required |
66+
| ----------------- | -------- |
67+
| `React.ReactNode` | No |
68+
69+
---
70+
71+
### `containerStyle`
72+
73+
Used to style the container component.
74+
75+
| Type | Required |
76+
| ---------------------- | -------- |
77+
| `StyleProp<ViewStyle>` | No |
78+
79+
## License
80+
81+
[MIT License](./LICENSE) © Alka, Inc

0 commit comments

Comments
 (0)