├── .babelrc ├── .eslintignore ├── .eslintrc ├── .flowconfig ├── .gitignore ├── .npmignore ├── .travis.yml ├── .watchmanconfig ├── LICENSE ├── README.en-US.md ├── README.md ├── README.zh-CN.md ├── docs ├── android.jpg └── ios.png ├── examples └── Basic │ ├── .babelrc │ ├── .buckconfig │ ├── .expo │ └── packager-info.json │ ├── .flowconfig │ ├── .gitattributes │ ├── .gitignore │ ├── .watchmanconfig │ ├── App.js │ ├── __tests__ │ └── App.js │ ├── android │ ├── app │ │ ├── BUCK │ │ ├── build.gradle │ │ ├── proguard-rules.pro │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── awesomeproject │ │ │ │ ├── MainActivity.java │ │ │ │ └── MainApplication.java │ │ │ └── res │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ ├── strings.xml │ │ │ └── styles.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ ├── keystores │ │ ├── BUCK │ │ └── debug.keystore.properties │ └── settings.gradle │ ├── app.json │ ├── index.js │ ├── ios │ ├── AwesomeProject-tvOS │ │ └── Info.plist │ ├── AwesomeProject-tvOSTests │ │ └── Info.plist │ ├── AwesomeProject.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── AwesomeProject-tvOS.xcscheme │ │ │ └── AwesomeProject.xcscheme │ ├── AwesomeProject │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Base.lproj │ │ │ └── LaunchScreen.xib │ │ ├── Images.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ │ └── Contents.json │ │ ├── Info.plist │ │ └── main.m │ └── AwesomeProjectTests │ │ ├── AwesomeProjectTests.m │ │ └── Info.plist │ ├── package-lock.json │ ├── package.json │ ├── rn-cli.config.js │ └── yarn.lock ├── package-lock.json ├── package.json └── src ├── Textarea.js └── index.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["react-native"] 3 | } 4 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | flow 2 | node_modules 3 | examples -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "babel-eslint", 3 | "extends": "airbnb", 4 | "env": { 5 | "browser": true, 6 | "node": true, 7 | "mocha": true 8 | }, 9 | "ecmaFeatures": { 10 | "forOf": true, 11 | "jsx": true, 12 | "es6": true 13 | }, 14 | "plugins": [ 15 | "react", "import" 16 | ], 17 | // Map from global var to bool specifying if it can be redefined 18 | "globals": { 19 | "__DEV__": true, 20 | "__dirname": false, 21 | "__fbBatchedBridgeConfig": false, 22 | "alert": true, 23 | "cancelAnimationFrame": false, 24 | "clearImmediate": true, 25 | "clearInterval": true, 26 | "clearTimeout": true, 27 | "console": true, 28 | "document": false, 29 | "escape": false, 30 | "Event": false, 31 | "EventTarget": false, 32 | "exports": false, 33 | "fetch": true, 34 | "FormData": false, 35 | "global": false, 36 | "jest": false, 37 | "Map": true, 38 | "module": false, 39 | "navigator": false, 40 | "process": false, 41 | "Promise": true, 42 | "requestAnimationFrame": true, 43 | "require": true, 44 | "Set": true, 45 | "setImmediate": true, 46 | "setInterval": false, 47 | "setTimeout": false, 48 | "window": false, 49 | "XMLHttpRequest": false, 50 | "pit": false, 51 | 52 | // Flow global types. 53 | "ReactComponent": false, 54 | "ReactClass": false, 55 | "ReactElement": false, 56 | "ReactPropsCheckType": false, 57 | "ReactPropsChainableTypeChecker": false, 58 | "ReactPropTypes": false, 59 | "SyntheticEvent": false, 60 | "$Either": false, 61 | "$All": false, 62 | "$Tuple": false, 63 | "$Supertype": false, 64 | "$Subtype": false, 65 | "$Shape": false, 66 | "$Diff": false, 67 | "$Keys": false, 68 | "$Enum": false, 69 | "$Exports": false, 70 | "$FlowIssue": false, 71 | "$FlowFixMe": false, 72 | "$FixMe": false, 73 | "Action": true, 74 | "State": true, 75 | "Generator": true 76 | }, 77 | "rules": { 78 | "global-require": 0, 79 | "no-console": 0, 80 | "comma-dangle": 0, 81 | "no-use-before-define": 0, 82 | "radix": 0, 83 | "no-param-reassign": 0, 84 | "no-mixed-operators": 0, 85 | "no-plusplus": 0, 86 | "class-methods-use-this": 0, 87 | "react/jsx-no-bind": 0, 88 | "no-underscore-dangle": 0, 89 | "eqeqeq": 0, 90 | "indent": [2, 2, {"SwitchCase": 0}], 91 | "max-len": ["error", 200], 92 | "no-restricted-syntax": ["off", "ForOfStatement"], 93 | "prefer-rest-params": 0, 94 | "func-names": "off", 95 | "no-shadow": "off", 96 | "arrow-body-style": ["off", "always"], 97 | "object-shorthand": "off", 98 | "no-continue": "off", 99 | 100 | "import/prefer-default-export": 0, 101 | "import/no-extraneous-dependencies": 0, 102 | "import/no-named-as-default": 1, 103 | "import/no-named-as-default-member": 1, 104 | 105 | "react/no-string-refs": 0, 106 | "react/prefer-es6-class": 1, 107 | "react/prop-types": 0, 108 | "react/jsx-filename-extension": 0, 109 | "react/prefer-stateless-function": 0 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | ; We fork some components by platform 3 | .*/*[.]android.js 4 | 5 | ; Ignore "BUCK" generated dirs 6 | /\.buckd/ 7 | 8 | ; Ignore unexpected extra "@providesModule" 9 | .*/node_modules/.*/node_modules/fbjs/.* 10 | 11 | ; Ignore duplicate module providers 12 | ; For RN Apps installed via npm, "Libraries" folder is inside 13 | ; "node_modules/react-native" but in the source repo it is in the root 14 | .*/Libraries/react-native/React.js 15 | 16 | ; Ignore polyfills 17 | .*/Libraries/polyfills/.* 18 | 19 | ; Ignore metro 20 | .*/node_modules/metro/.* 21 | 22 | [include] 23 | 24 | [libs] 25 | node_modules/react-native/Libraries/react-native/react-native-interface.js 26 | node_modules/react-native/flow/ 27 | node_modules/react-native/flow-github/ 28 | 29 | [options] 30 | emoji=true 31 | 32 | module.system=haste 33 | 34 | munge_underscores=true 35 | 36 | module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub' 37 | 38 | module.file_ext=.js 39 | module.file_ext=.jsx 40 | module.file_ext=.json 41 | module.file_ext=.native.js 42 | 43 | suppress_type=$FlowIssue 44 | suppress_type=$FlowFixMe 45 | suppress_type=$FlowFixMeProps 46 | suppress_type=$FlowFixMeState 47 | 48 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) 49 | suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ 50 | suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy 51 | suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError 52 | 53 | [version] 54 | ^0.65.0 55 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OSX 2 | # 3 | .DS_Store 4 | 5 | # VSCode 6 | .vscode/ 7 | jsconfig.json 8 | 9 | # Xcode 10 | # 11 | build/ 12 | *.pbxuser 13 | !default.pbxuser 14 | *.mode1v3 15 | !default.mode1v3 16 | *.mode2v3 17 | !default.mode2v3 18 | *.perspectivev3 19 | !default.perspectivev3 20 | xcuserdata 21 | *.xccheckout 22 | *.moved-aside 23 | DerivedData 24 | *.hmap 25 | *.ipa 26 | *.xcuserstate 27 | project.xcworkspace 28 | 29 | # Android/IntelliJ 30 | # 31 | build/ 32 | .idea 33 | .gradle 34 | local.properties 35 | *.iml 36 | 37 | # node.js 38 | # 39 | node_modules/ 40 | npm-debug.log 41 | yarn-error.log 42 | 43 | # BUCK 44 | buck-out/ 45 | \.buckd/ 46 | *.keystore 47 | 48 | # Misc -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .idea 3 | examples 4 | __tests__ 5 | node_modules -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | 3 | node_js: 4 | - 8.9.1 5 | 6 | script: 7 | - npm run ci 8 | 9 | branches: 10 | only: 11 | - master -------------------------------------------------------------------------------- /.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Leo Xin 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. 22 | -------------------------------------------------------------------------------- /README.en-US.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xinlc/react-native-textarea/6406ba65fe02b7e3d9453b0d8969c72a9f64d086/README.en-US.md -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | English | [简体中文](./README.zh-CN.md) 2 | 3 | # react-native-textarea 4 | 5 | [![npm package](https://img.shields.io/npm/v/react-native-textarea.svg?style=flat-square)](https://www.npmjs.org/package/react-native-textarea) 6 | [![npm downloads](https://img.shields.io/npm/dt/react-native-textarea.svg)](https://www.npmjs.com/package/react-native-textarea) 7 | [![build](https://img.shields.io/travis/xinlc/react-native-textarea.svg?style=flat-square)](https://travis-ci.org/xinlc/react-native-textarea) 8 | 9 | React Native textarea component 10 | 11 | ## Example 12 | 13 | ![](./docs/ios.png) 14 | ![](./docs/android.jpg) 15 | 16 | ## Installation 17 | 18 | 1. Install package via npm: 19 | 20 | ```bash 21 | $ npm install --save react-native-textarea 22 | ``` 23 | 24 | 2. Include the library in your code: 25 | 26 | ```js 27 | import Textarea from 'react-native-textarea'; 28 | ``` 29 | 30 | 3. Use the component: 31 | 32 | ```js 33 | ... 34 | 35 |