File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,13 +47,14 @@ import TextArea from "react-native-text-area";
4747
4848## Configuration - Props
4949
50- | Property | Type | Default | Description |
51- | -------------------- | :----: | :-------: | ----------------------------------------- |
52- | backgroundColor | color | "#fbfbfb" | change the TextArea's background color |
53- | charCount | number | 0 | set the current character count |
54- | maxCharLimit | number | 200 | set the maximum character count limit |
55- | charCountColor | color | "#ccc" | change character count's color |
56- | exceedCharCountColor | color | "red" | change the exceeded character count color |
50+ | Property | Type | Default | Description |
51+ | -------------------- | :----: | :------------: | ----------------------------------------- |
52+ | styles | style | check the code | set your own style |
53+ | backgroundColor | color | "#fbfbfb" | change the TextArea's background color |
54+ | charCount | number | 0 | set the current character count |
55+ | maxCharLimit | number | 200 | set the maximum character count limit |
56+ | charCountColor | color | "#ccc" | change character count's color |
57+ | exceedCharCountColor | color | "red" | change the exceeded character count color |
5758
5859## Author
5960
Original file line number Diff line number Diff line change 11import React , { Fragment } from "react" ;
22import { SafeAreaView } from "react-native" ;
33
4- import TextArea from "@freakycoder/react-native-text-area" ;
4+ // import TextArea from "@freakycoder/react-native-text-area";
5+ import TextArea from "./lib/src/TextArea" ;
56
67const App = ( ) => {
78 return (
89 < Fragment >
910 < SafeAreaView >
1011 < TextArea
1112 maxCharLimit = { 50 }
13+ style = { { height : 350 } }
1214 placeholderTextColor = "black"
1315 exceedCharCountColor = "#990606"
1416 placeholder = { "Write your review..." }
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ export default class TextArea extends Component {
3535
3636 render ( ) {
3737 const {
38+ style,
3839 maxCharLimit,
3940 charCountColor,
4041 backgroundColor,
@@ -44,7 +45,7 @@ export default class TextArea extends Component {
4445 rest . maxCharLimit = maxCharLimit ;
4546 }
4647 return (
47- < View style = { container ( backgroundColor ) } >
48+ < View style = { container ( style , backgroundColor ) } >
4849 < TextInput
4950 multiline
5051 { ...rest }
Original file line number Diff line number Diff line change @@ -8,12 +8,13 @@ export function charCountStyle(charCountColor) {
88 } ;
99}
1010
11- export function container ( backgroundColor ) {
11+ export function container ( style , backgroundColor ) {
1212 return {
1313 width : "100%" ,
1414 height : 200 ,
1515 backgroundColor,
16- textAlignVertical : "top"
16+ textAlignVertical : "top" ,
17+ ...style
1718 } ;
1819}
1920
Original file line number Diff line number Diff line change 11{
22 "name" : " @freakycoder/react-native-text-area" ,
3- "version" : " 0.0.1 " ,
3+ "version" : " 0.0.11 " ,
44 "description" : " Simple and easy to use TextArea for React Native" ,
55 "keywords" : [
66 " ios" ,
You can’t perform that action at this time.
0 commit comments