|
1 | | -<img alt="React Native Typescript Library Starter" src="assets/logo.png" width="1050"/> |
| 1 | +<img alt="React Native Empty State" src="assets/logo.png" width="1050"/> |
2 | 2 |
|
3 | | -[](https://github.com/WrathChaos/react-native-typescript-library-starter) |
| 3 | +[](https://github.com/WrathChaos/react-native-empty-state) |
4 | 4 |
|
5 | | -[](https://github.com/WrathChaos/react-native-typescript-library-starter) |
| 5 | +[](https://github.com/WrathChaos/react-native-empty-state) |
6 | 6 |
|
7 | | -[](https://www.npmjs.com/package/react-native-typescript-library-starter) |
8 | | -[](https://www.npmjs.com/package/react-native-typescript-library-starter) |
| 7 | +[](https://www.npmjs.com/package/@freakycoder/react-native-empty-state) |
| 8 | +[](https://www.npmjs.com/package/@freakycoder/react-native-empty-state) |
9 | 9 |  |
10 | 10 | [](https://opensource.org/licenses/MIT) |
11 | 11 | [](https://github.com/prettier/prettier) |
12 | 12 |
|
13 | 13 | <p align="center"> |
14 | | - <img alt="React Native Typescript Library Starter" |
15 | | - src="assets/Screenshots/typescript.jpg" /> |
| 14 | + <img alt="React Native Empty State" |
| 15 | + src="assets/Screenshots/react-native-empty-state.jpg" /> |
16 | 16 | </p> |
17 | 17 |
|
18 | | -## Library Usage |
19 | | - |
20 | | -- `npm i` |
21 | | -- Delete example folder |
22 | | -- Delete build folder |
23 | | -- Make your own library into the `lib` folder |
24 | | -- Change package.json |
25 | | -- Change README for your own documentation |
26 | | -- `npm run build` |
27 | | - |
28 | | -``` |
29 | | -> react-native-typescript-library-starter@0.1.0 build /Users/kuray/Coursion/MyLibraries/ReactNative/react-native-typescript-library-starter |
30 | | -> cd lib && tsc && cp ../package.json ../build/dist/ && Echo Build completed! |
31 | | -
|
32 | | -Build completed! |
33 | | -``` |
34 | | - |
35 | | -- Test your build/dist into the new project |
36 | | -- Finally, time to npm publish :) |
37 | | - |
38 | | -### Below part is for Documentation ! Remove above Library Usage |
39 | | - |
40 | 18 | # Installation |
41 | 19 |
|
42 | 20 | Add the dependency: |
43 | 21 |
|
44 | 22 | ```bash |
45 | | -npm i react-native-typescript-library-starter |
| 23 | +npm i @freakycoder/react-native-empty-state |
46 | 24 | ``` |
47 | 25 |
|
48 | 26 | ## Peer Dependencies |
49 | 27 |
|
50 | 28 | <h5><i>IMPORTANT! You need install them</i></h5> |
51 | 29 |
|
52 | 30 | ```js |
53 | | -"react": ">= 16.x.x", |
54 | | -"react-native": ">= 0.55.x", |
| 31 | +"@freakycoder/react-native-bounceable": ">= 0.2.2", |
55 | 32 | ``` |
56 | 33 |
|
57 | 34 | # Usage |
58 | 35 |
|
59 | 36 | ## Import |
60 | 37 |
|
61 | 38 | ```jsx |
62 | | -import MyComponent from "react-native-typescript-library-starter"; |
| 39 | +import MyComponent from "@freakycoder/react-native-empty-state"; |
63 | 40 | ``` |
64 | 41 |
|
65 | 42 | ## Fundamental Usage |
66 | 43 |
|
67 | 44 | ```jsx |
68 | | -<MyComponent /> |
| 45 | +<EmptyState |
| 46 | + enableButton |
| 47 | + buttonText="Refresh" |
| 48 | + imageSource={emptyStateImage} |
| 49 | + title="Opps! Anything here :(" |
| 50 | + description="We cannot find anything here, try again sometime" |
| 51 | +/> |
69 | 52 | ``` |
70 | 53 |
|
| 54 | +## Example Project 😍 |
| 55 | + |
| 56 | +You can checkout the example project 🥰 |
| 57 | + |
| 58 | +Simply run |
| 59 | + |
| 60 | +- `npm i` |
| 61 | +- `react-native run-ios/android` |
| 62 | + |
| 63 | +should work of the example project. |
| 64 | + |
71 | 65 | # Configuration - Props |
72 | 66 |
|
73 | | -| Property | Type | Default | Description | |
74 | | -| -------- | :-----: | :-----: | ------------------------------------------------------- | |
75 | | -| outline | boolean | true | make the button outline | |
76 | | -| solid | boolean | false | make the button with a solid background and a shadow | |
77 | | -| gradient | boolean | false | make the button with a gradient background and a shadow | |
78 | | -| width | number | 150 | change the button's width | |
| 67 | +## Fundamentals |
79 | 68 |
|
80 | | -## Future Plans |
| 69 | +| Property | Type | Default | Description | |
| 70 | +| ----------- | :----: | :-------: | --------------------- | |
| 71 | +| title | string | undefined | change the title | |
| 72 | +| description | string | undefined | change the descrition | |
81 | 73 |
|
82 | | -- [x] ~~LICENSE~~ |
83 | | -- [ ] Write an article about the lib on Medium |
| 74 | +## Customization (Optionals) |
84 | 75 |
|
85 | | -# Change Log |
| 76 | +| Property | Type | Default | Description | |
| 77 | +| -------------------- | :-------: | :-------: | ---------------------------------------------------------------------- | |
| 78 | +| enableButton | boolean | false | let you enable the button (must use it for button) | |
| 79 | +| onPress | function | undefined | set your own logic for the button functionality when it is pressed | |
| 80 | +| buttonText | string | undefined | change the button's text | |
| 81 | +| style | ViewStyle | default | set or override the style object for the main container | |
| 82 | +| buttonStyle | ViewStyle | default | set or override the style object for the button style | |
| 83 | +| titleTextStyle | TextStyle | default | set or override the style object for the title text style | |
| 84 | +| buttonTextStyle | TextStyle | default | set or override the style object for the button's text style | |
| 85 | +| descriptionTextStyle | TextStyle | default | set or override the style object for the description text style | |
| 86 | +| ImageComponent | Image | default | set your own component instead of default react-native Image component | |
86 | 87 |
|
87 | | -Change log will be here ! |
| 88 | +## Future Plans |
| 89 | + |
| 90 | +- [x] ~~LICENSE~~ |
88 | 91 |
|
89 | 92 | ## Author |
90 | 93 |
|
91 | 94 | FreakyCoder, kurayogun@gmail.com |
92 | 95 |
|
93 | 96 | ## License |
94 | 97 |
|
95 | | -React Native Typescript Library Starter is available under the MIT license. See the LICENSE file for more info. |
| 98 | +React Native Empty State is available under the MIT license. See the LICENSE file for more info. |
0 commit comments