Skip to content

Commit bb433e8

Browse files
committed
Documentation Added
1 parent 3b5b68c commit bb433e8

File tree

2 files changed

+45
-50
lines changed

2 files changed

+45
-50
lines changed

README.md

Lines changed: 37 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,100 @@
11
| | | | | |
22
| --------------------------------------- | -------- | ---------- |---------- |---------- |
3-
| <a href="https://www.npmjs.com/package/react-native-dropdown-country-picker">![NPM VERSION](https://img.shields.io/npm/v/react-native-dropdown-country-picker?style=for-the-badge)</a> | <a href="https://www.npmjs.com/package/react-native-dropdown-country-picker">![NPM WEEKLY DOWNLOADS](https://img.shields.io/npm/dw/react-native-dropdown-country-picker?color=%232CA215&label=WEEKLY%20DOWNLOADS&style=for-the-badge)</a> | <a href="https://github.com/mmusaib/react-native-dropdown-country-picker/stargazers">![GITHUB STAR](https://img.shields.io/github/stars/mmusaib/react-native-dropdown-country-picker?label=Give%20Us%20A%20Star&style=for-the-badge)</a> | <a href="https://www.youtube.com/channel/UCSwIR2KBHiqiProH3Me8IZQ">![YOUTUBE VIEWS](https://img.shields.io/youtube/channel/views/UCSwIR2KBHiqiProH3Me8IZQ?label=YOUTUBE%20VIEWS&style=for-the-badge)</a> | <a href="https://www.npmjs.com/package/react-native-dropdown-country-picker">![NPM LIFETIME DOWNLOADS](https://img.shields.io/npm/dt/react-native-dropdown-country-picker?color=%232CA215&style=for-the-badge)</a>
3+
| <a href="https://www.npmjs.com/package/react-native-skeleton-loading">![NPM VERSION](https://img.shields.io/npm/v/react-native-skeleton-loading?style=for-the-badge)</a> | <a href="https://www.npmjs.com/package/react-native-skeleton-loading">![NPM WEEKLY DOWNLOADS](https://img.shields.io/npm/dw/react-native-skeleton-loading?color=%232CA215&label=WEEKLY%20DOWNLOADS&style=for-the-badge)</a> | <a href="https://github.com/mmusaib/react-native-skeleton-loading/stargazers">![GITHUB STAR](https://img.shields.io/github/stars/mmusaib/react-native-skeleton-loading?label=Give%20Us%20A%20Star&style=for-the-badge)</a> | <a href="https://www.youtube.com/channel/UCSwIR2KBHiqiProH3Me8IZQ">![YOUTUBE VIEWS](https://img.shields.io/youtube/channel/views/UCSwIR2KBHiqiProH3Me8IZQ?label=YOUTUBE%20VIEWS&style=for-the-badge)</a> | <a href="https://www.npmjs.com/package/react-native-skeleton-loading">![NPM LIFETIME DOWNLOADS](https://img.shields.io/npm/dt/react-native-skeleton-loading?color=%232CA215&style=for-the-badge)</a>
44

55
<h1 align="center">
66
🏳️‍🌈 React Native Skeleton Loading
77
</h1>
88

99
<div align="center">
1010

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
1212

1313
<a href="https://twitter.com/_mmusaib" target="_blank"></a>
1414
<img src="https://i.imgur.com/sLjgFRR.gif" width="400" />
1515
</div>
1616

1717

1818

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
2025

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
2626

2727

2828

2929
# Compatibility
3030

3131

32-
| iOS | Android | Web | Expo |
33-
--------|---------|-----|------|
34-
||| | |
32+
| iOS | Android | Expo |
33+
--------|---------|------|
34+
||||
3535

3636

3737

3838

3939
# 🔌 Installation
4040

4141
```sh
42-
$ npm install react-native-dropdown-country-picker
42+
$ npm install react-native-skeleton-loading
4343

4444
```
4545

4646
OR
4747

4848
```sh
49-
$ yarn add react-native-dropdown-country-picker
49+
$ yarn add react-native-skeleton-loading
5050
```
5151

5252

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+
5458
```jsx
55-
import CountryCodeDropdownPicker from 'react-native-dropdown-country-picker'
59+
import SkeletonLoading from 'react-native-skeleton-loading'
5660

5761
const App = () => {
58-
const [selected, setSelected] = React.useState('+91');
59-
const [country, setCountry] = React.useState('');
60-
const [phone, setPhone] = React.useState('');
6162

6263
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>
7174
)
7275

7376
};
7477
```
7578

7679

7780

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)
7982

8083
# ⭐ 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+
9689

9790

9891

9992

10093

10194

102-
# ▶️ Watch Tutorial Video -->
95+
<!-- # ▶️ Watch Tutorial Video
10396
104-
[![Watch video](https://i.imgur.com/QcWCHk9.png)](https://www.youtube.com/watch?v=ZstelmTWhjw)
97+
[![Watch video](https://i.imgur.com/QcWCHk9.png)](https://www.youtube.com/watch?v=ZstelmTWhjw) -->
10598

10699

107100
<!-- For Live `Demo` [(Expo Snack)](https://snack.expo.dev/@mmusaib/react-native-stock-star-rating)

index.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ import Reanimated,{ useSharedValue, withRepeat, useAnimatedStyle, withTiming, in
77

88
interface SkeletonProps {
99
/**
10-
* background of the loader componenet
10+
* background of the loader componenet hexcode
1111
*/
1212
background: string,
1313

1414
/**
15-
* highlight color of the loader component
15+
* highlight color of the loader component hexcode
1616
*/
1717
highlight: string
1818
}
@@ -23,7 +23,7 @@ const SkeletonLoading: React.FC<SkeletonProps> = ({
2323
background,
2424
highlight
2525
}) => {
26-
26+
2727
const [layout, setLayout] = React.useState();
2828
const shared = useSharedValue(0);
2929

@@ -80,11 +80,13 @@ const SkeletonLoading: React.FC<SkeletonProps> = ({
8080
)
8181
}
8282

83+
84+
export default SkeletonLoading;
85+
86+
8387
const styles = StyleSheet.create({
8488
container: {
8589
flexGrow: 1,
8690
overflow: 'hidden'
8791
}
88-
})
89-
90-
export default SkeletonLoading;
92+
})

0 commit comments

Comments
 (0)