Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 4c7c0f5

Browse files
committed
updated README
1 parent df2d78c commit 4c7c0f5

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,32 @@ const App = () => (
6565
export default App;
6666
```
6767

68+
### Props
69+
70+
#### `height?: number`
71+
72+
Height of the blank spacer
73+
74+
#### `width?: number`
75+
76+
Width of the blank spacer ﹣ used to apply space when `flexDirection: row`
77+
78+
#### `color?: color string`
79+
80+
Color of the blank spacer
81+
82+
#### ViewProps
83+
84+
All the existing [View props](https://reactnative.dev/docs/view#props) are supported as blank spacer extends the view component
85+
6886
## Recipes
6987

88+
- Follow the link to the snack for [Simple Usage](https://snack.expo.io/@daniakash/blank-spacer-example)
89+
90+
- If you want to apply spacing based on the device screen size, you can use the blank spacer with [react-native-responsive-dimensions](https://github.com/DaniAkash/react-native-responsive-dimensions)
91+
92+
- If you want a blank space to avoid keyboard (i.e) a keyboard avoiding view, you can use [react-native-keyboad-spacer](https://www.npmjs.com/package/react-native-keyboard-spacer) or pair the blank spacer with keyboard height received from [`useKeyboard`](https://github.com/react-native-community/hooks#usekeyboard) hook of [react native hooks](https://github.com/react-native-community/hooks)
93+
7094
<!-- [build]: https://github.com/DaniAkash/react-native-blank-spacer/actions
7195
[build-badge]: https://github.com/daniakash/react-native-blank-spacer/workflows/build/badge.svg
7296
[coverage-badge]: https://api.codeclimate.com/v1/badges/0cf535fb8d3da2aa4a91/test_coverage

0 commit comments

Comments
 (0)