|
1 | 1 | | | | | | |
|
2 | 2 | | --------------------------------------- | -------- | ---------- |---------- |---------- |
|
3 |
| -| <a href="https://www.npmjs.com/package/react-native-dropdown-country-picker"></a> | <a href="https://www.npmjs.com/package/react-native-dropdown-country-picker"></a> | <a href="https://github.com/mmusaib/react-native-dropdown-country-picker/stargazers"></a> | <a href="https://www.youtube.com/channel/UCSwIR2KBHiqiProH3Me8IZQ"></a> | <a href="https://www.npmjs.com/package/react-native-dropdown-country-picker"></a> |
| 3 | +| <a href="https://www.npmjs.com/package/react-native-skeleton-loading"></a> | <a href="https://www.npmjs.com/package/react-native-skeleton-loading"></a> | <a href="https://github.com/mmusaib/react-native-skeleton-loading/stargazers"></a> | <a href="https://www.youtube.com/channel/UCSwIR2KBHiqiProH3Me8IZQ"></a> | <a href="https://www.npmjs.com/package/react-native-skeleton-loading"></a> |
4 | 4 |
|
5 | 5 | <h1 align="center">
|
6 | 6 | 🏳️🌈 React Native Skeleton Loading
|
7 | 7 | </h1>
|
8 | 8 |
|
9 | 9 | <div align="center">
|
10 | 10 |
|
11 |
| -🟢 React Native Dropdown Country Picker Similar as HTML Select List. It's not a modal. |
| 11 | +🟢 Skeleton Loading Component for Expo and React Native powered apps |
12 | 12 |
|
13 | 13 | <a href="https://twitter.com/_mmusaib" target="_blank"></a>
|
14 | 14 | <img src="https://i.imgur.com/sLjgFRR.gif" width="400" />
|
15 | 15 | </div>
|
16 | 16 |
|
17 | 17 |
|
18 | 18 |
|
19 |
| -<h4>Light Weight and <b>Robust</b> Country Picker So Far.</h4> |
| 19 | +<h4>Light Weight and <b>Robust</b> Skeleton Loader.</h4> |
| 20 | + |
| 21 | +- Design skeleton loading screen of your choice |
| 22 | +- Pass colors of your choice |
| 23 | +- Powered by Reanimated 3 |
| 24 | +- Make your apps professional in UI/UX |
20 | 25 |
|
21 |
| -- Equivalent to React Native Stock Component |
22 |
| -- Use the styles of your choice |
23 |
| -- Search the countries seamlessly |
24 |
| -- Option to add customizable input mobile field next to the Picker |
25 |
| -- Zero dependencies |
26 | 26 |
|
27 | 27 |
|
28 | 28 |
|
29 | 29 | # Compatibility
|
30 | 30 |
|
31 | 31 |
|
32 |
| -| iOS | Android | Web | Expo | |
33 |
| ---------|---------|-----|------| |
34 |
| -| ✅ | ✅ | ✅ | ✅ | |
| 32 | +| iOS | Android | Expo | |
| 33 | +--------|---------|------| |
| 34 | +| ✅ | ✅ | ✅ | |
35 | 35 |
|
36 | 36 |
|
37 | 37 |
|
38 | 38 |
|
39 | 39 | # 🔌 Installation
|
40 | 40 |
|
41 | 41 | ```sh
|
42 |
| -$ npm install react-native-dropdown-country-picker |
| 42 | +$ npm install react-native-skeleton-loading |
43 | 43 |
|
44 | 44 | ```
|
45 | 45 |
|
46 | 46 | OR
|
47 | 47 |
|
48 | 48 | ```sh
|
49 |
| -$ yarn add react-native-dropdown-country-picker |
| 49 | +$ yarn add react-native-skeleton-loading |
50 | 50 | ```
|
51 | 51 |
|
52 | 52 |
|
53 |
| -# 😎 Displaying the country picker |
| 53 | +# 😎 Displaying the skeleton loading |
| 54 | +All you need is to just import the skeleton loading component, and in between the |
| 55 | +closing and ending tags, you can design the UI of your skeleton loading screen |
| 56 | +as shown in the code snippet below: |
| 57 | + |
54 | 58 | ```jsx
|
55 |
| -import CountryCodeDropdownPicker from 'react-native-dropdown-country-picker' |
| 59 | +import SkeletonLoading from 'react-native-skeleton-loading' |
56 | 60 |
|
57 | 61 | const App = () => {
|
58 |
| - const [selected, setSelected] = React.useState('+91'); |
59 |
| - const [country, setCountry] = React.useState(''); |
60 |
| - const [phone, setPhone] = React.useState(''); |
61 | 62 |
|
62 | 63 | return(
|
63 |
| - <CountryCodeDropdownPicker |
64 |
| - selected={selected} |
65 |
| - setSelected={setSelected} |
66 |
| - setCountryDetails={setCountry} |
67 |
| - phone={phone} |
68 |
| - setPhone={setPhone} |
69 |
| - countryCodeTextStyles={{fontSize: 13}} |
70 |
| - /> |
| 64 | + <SkeletonLoading background={ 'lightgrey' } highlight={ 'white' }> |
| 65 | + <View style={{ flexDirection: 'row', justifyContent: 'space-between' }}> |
| 66 | + <View style={{ width: "20%", height: "14%", backgroundColor: 'lightgrey', borderRadius: 10 }} /> |
| 67 | + |
| 68 | + <View style={{ flex:1 }}}> |
| 69 | + <View style={{ backgroundColor: 'lightgrey', width: "50%", height: 10, marginBottom: 3, borderRadius: 5 }} /> |
| 70 | + <View style={{ backgroundColor: 'lightgrey', width: '20%', height: 8, borderRadius: 5 }} /> |
| 71 | + </View> |
| 72 | + </View> |
| 73 | + </SkeletonLoading> |
71 | 74 | )
|
72 | 75 |
|
73 | 76 | };
|
74 | 77 | ```
|
75 | 78 |
|
76 | 79 |
|
77 | 80 |
|
78 |
| -For Live `Demo` [(Expo Snack)](https://snack.expo.dev/@mmusaib/react-native-dropdown-country-picker) |
| 81 | +For Live `Demo` [(Expo Snack)](https://snack.expo.dev/@mmusaib/react-native-skeleton-loading) |
79 | 82 |
|
80 | 83 | # ⭐ Props for the component
|
81 |
| -| Name | Type | Description | Default | |
82 |
| -| ---- | ---- | ----------- | ----------- | |
83 |
| -| selected | state var | The default selected country dial code stored in state variable | N/A |
84 |
| -| setSelected | Function | setState function to set the selected state variable | N/A |
85 |
| -| setCountryDetails | Function | setState function to set additional country details in respective state variable (Optional) | N/A |
86 |
| -| phone | state var | state variable if you want to display phone number field (Optional) | N/A |
87 |
| -| setPhone | Funtion | setState function to set the phone state variable (Optional) | N/A |
88 |
| -| countryCodeContainerStyles | style Object | style object to style the country code container (Optional) | N/A |
89 |
| -| countryCodeTextStyles | style object | style object to style the text inside country code container (Optional) | N/A |
90 |
| -| phoneStyles | style object | style object to style the text input of phone field (Optional) | N/A |
91 |
| -| searchIcon | string | URL of the icon if you want to replace the search icon (Optional) | N/A |
92 |
| -| closeIcon | string | URL of the icon if you want to replace the close icon (Optional) | N/A |
93 |
| -| searchStyles | style object | style object to style the search input field (Optional) | N/A |
94 |
| -| dropdownStyles | style object | style object to style the dropdown container (Optional) | N/A |
95 |
| -| dropdownTextStyles | style object | style object to style the text inside dropdown container (Optional) | N/A |
| 84 | +| Name | Type | Description | |
| 85 | +| ---- | ----------- | ----------- | |
| 86 | +| background | hex color string | Hex color string for the background of loading component |
| 87 | +| highlight | hex color string | Hex color string for the highlight of loading component |
| 88 | + |
96 | 89 |
|
97 | 90 |
|
98 | 91 |
|
99 | 92 |
|
100 | 93 |
|
101 | 94 |
|
102 |
| -# ▶️ Watch Tutorial Video --> |
| 95 | +<!-- # ▶️ Watch Tutorial Video |
103 | 96 |
|
104 |
| - [](https://www.youtube.com/watch?v=ZstelmTWhjw) |
| 97 | + [](https://www.youtube.com/watch?v=ZstelmTWhjw) --> |
105 | 98 |
|
106 | 99 |
|
107 | 100 | <!-- For Live `Demo` [(Expo Snack)](https://snack.expo.dev/@mmusaib/react-native-stock-star-rating)
|
|
0 commit comments