Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
MarjorieMaillee authored Jun 20, 2024
1 parent 43ef6c3 commit 702aa42
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ import { MagicScroll } from '@appandflow/react-native-magic-scroll';

// rest of your imports

const textInputStyle = {
height: 50,
backgroundColor: '#ddd',
borderRadius: 10,
marginTop: 8,
};


const YourForm = () => {
return (
<View>
Expand All @@ -94,25 +102,15 @@ const YourForm = () => {
// This is the function that will make the text input named "password" focused when pressing the Enter key on the device's keyboard
chainable="password"
textInputProps={{
style: {
height: 50,
backgroundColor: '#ddd',
borderRadius: 10,
marginTop: 8,
},
style: textInputStyle,
}}
/>
<MagicScroll.TextInput
name="password"
renderTop={() => <Text>Password</Text>}
textInputProps={{
secureTextEntry: true,
style: {
height: 50,
backgroundColor: '#ddd',
borderRadius: 10,
marginTop: 8,
},
style: textInputStyle,
}}
/>
</View>
Expand Down Expand Up @@ -171,14 +169,14 @@ Scrollview props:
| Name | Description | Values |
| ---- | ----------- | ------ |
| additionalPadding | adds extra padding between your text input and the keyboard | number |
| scrollViewProps | contains all props of the scrollview from React's Reanimated library | |
| scrollViewProps | contains all props of the scrollview from React's Reanimated library | [props](https://reactnative.dev/docs/scrollview#props) |

Text Input props:

| Name | Description | Values |
| ---- | ----------- | ------ |
| chainable | a string containing the name of the next text input that will be focused when pressing the "Enter Key" | string |
| containerStyle | contains all Style props of the View from React Native | |
| containerStyle | contains all Style props of the View from React Native | [props](https://reactnative.dev/docs/view-style-props) |
| name | a string to name the current text input, used in the "chainable" props mentionned above | string |
| renderBottom() | a function that renders components to display custom text under the text input | ```renderBottom={() => <Text>bottomText</Text>}``` |
| renderTop() | a function that renders components to display custom text above the text input | ```renderTop={() => <Text>topText</Text>}``` |
Expand Down

0 comments on commit 702aa42

Please sign in to comment.