Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
chramos committed Oct 17, 2022
2 parents 0285c8d + 8edbf24 commit 39f6a83
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 21 deletions.
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,34 @@
SkeletonPlaceholder is a React Native library to easily create an amazing loading effect with FlexBox.<br/>
Android and iOS

![](https://github.com/chramos/react-native-skeleton-placeholder/tree/master/assets/preview.mp4)
![](https://user-images.githubusercontent.com/20586489/194037825-92efe72b-2e00-407d-8b18-ab949a85e1ea.mp4)





### Installation

> Note: This package requires **@react-native-community/masked-view** and **react-native-linear-gradient**
> Note: This package requires **@react-native-masked-view/masked-view** and **react-native-linear-gradient**

###### Step #1

Using yarn:

```bash
yarn add @react-native-community/masked-view react-native-linear-gradient
yarn add @react-native-masked-view/masked-view react-native-linear-gradient
```

Using npm:

```bash
npm install @react-native-community/masked-view react-native-linear-gradient --save
npm install @react-native-masked-view/masked-view react-native-linear-gradient --save
```

If you are running a **react-native** version below 0.60:

```bash
react-native link @react-native-community/masked-view react-native-linear-gradient
react-native link @react-native-masked-view/masked-view react-native-linear-gradient
```

Otherwise:
Expand Down
4 changes: 2 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ DEPENDENCIES:
- React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`)
- React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`)
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
- "RNCMaskedView (from `../node_modules/@react-native-community/masked-view`)"
- "RNCMaskedView (from `../node_modules/@react-native-masked-view/masked-view`)"
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)

SPEC REPOS:
Expand Down Expand Up @@ -369,7 +369,7 @@ EXTERNAL SOURCES:
ReactCommon:
:path: "../node_modules/react-native/ReactCommon"
RNCMaskedView:
:path: "../node_modules/@react-native-community/masked-view"
:path: "../node_modules/@react-native-masked-view/masked-view"
Yoga:
:path: "../node_modules/react-native/ReactCommon/yoga"

Expand Down
2 changes: 1 addition & 1 deletion example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"lint": "eslint ."
},
"dependencies": {
"@react-native-community/masked-view": "^0.1.11",
"@react-native-masked-view/masked-view": "^0.2.8",
"react": "18.2.0",
"react-native": "0.64.2",
"react-native-linear-gradient": "^2.5.6",
Expand Down
8 changes: 4 additions & 4 deletions example/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1108,10 +1108,10 @@
eslint-plugin-react-native "3.6.0"
prettier "1.16.4"

"@react-native-community/masked-view@^0.1.11":
version "0.1.11"
resolved "https://registry.yarnpkg.com/@react-native-community/masked-view/-/masked-view-0.1.11.tgz#2f4c6e10bee0786abff4604e39a37ded6f3980ce"
integrity sha512-rQfMIGSR/1r/SyN87+VD8xHHzDYeHaJq6elOSCAD+0iLagXkSI2pfA0LmSXP21uw5i3em7GkkRjfJ8wpqWXZNw==
"@react-native-masked-view/masked-view@^0.2.8":
version "0.2.8"
resolved "https://registry.yarnpkg.com/@react-native-masked-view/masked-view/-/masked-view-0.2.8.tgz#34405a4361882dae7c81b1b771fe9f5fbd545a97"
integrity sha512-+1holBPDF1yi/y0uc1WB6lA5tSNHhM7PpTMapT3ypvSnKQ9+C6sy/zfjxNxRA/llBQ1Ci6f94EaK56UCKs5lTA==

"@react-native/[email protected]":
version "1.0.0"
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"license": "ISC",
"devDependencies": {
"@react-native-community/eslint-config": "3.0.3",
"@react-native-community/masked-view": "^0.1.11",
"@react-native-masked-view/masked-view": "^0.2.8",
"@types/prop-types": "^15.7.3",
"@types/react": "^16.9.17",
"@types/react-native": "^0.63.17",
Expand All @@ -37,9 +37,9 @@
"typescript": "^4.0.2"
},
"peerDependencies": {
"@react-native-community/masked-view": "^0.1.11",
"@react-native-masked-view/masked-view": "^0.2.8",
"react": ">=0.14.8",
"react-native": ">=0.50.1",
"react-native-linear-gradient": "^2.5.6"
}
}
}
4 changes: 2 additions & 2 deletions src/skeleton-placeholder.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import MaskedView from '@react-native-community/masked-view';
import MaskedView from '@react-native-masked-view/masked-view';
import * as React from 'react';
import {
Animated,
Expand Down Expand Up @@ -49,7 +49,7 @@ type SkeletonPlaceholderProps = {
};

type SkeletonPlaceholderItemProps = ViewStyle & {
style: StyleProp<ViewStyle>;
style?: StyleProp<ViewStyle>;
};

const SkeletonPlaceholder: React.FC<SkeletonPlaceholderProps> & {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -306,10 +306,10 @@
resolved "https://registry.yarnpkg.com/@react-native-community/eslint-plugin/-/eslint-plugin-1.2.0.tgz#7d6d789ae8edf73dc9bed1246cd48277edea8066"
integrity sha512-o6aam+0Ug1xGK3ABYmBm0B1YuEKfM/5kaoZO0eHbZwSpw9UzDX4G5y4Nx/K20FHqUmJHkZmLvOUFYwN4N+HqKA==

"@react-native-community/masked-view@^0.1.11":
version "0.1.11"
resolved "https://registry.yarnpkg.com/@react-native-community/masked-view/-/masked-view-0.1.11.tgz#2f4c6e10bee0786abff4604e39a37ded6f3980ce"
integrity sha512-rQfMIGSR/1r/SyN87+VD8xHHzDYeHaJq6elOSCAD+0iLagXkSI2pfA0LmSXP21uw5i3em7GkkRjfJ8wpqWXZNw==
"@react-native-masked-view/masked-view@^0.2.8":
version "0.2.8"
resolved "https://registry.yarnpkg.com/@react-native-masked-view/masked-view/-/masked-view-0.2.8.tgz#34405a4361882dae7c81b1b771fe9f5fbd545a97"
integrity sha512-+1holBPDF1yi/y0uc1WB6lA5tSNHhM7PpTMapT3ypvSnKQ9+C6sy/zfjxNxRA/llBQ1Ci6f94EaK56UCKs5lTA==

"@types/json-schema@^7.0.9":
version "7.0.11"
Expand Down

0 comments on commit 39f6a83

Please sign in to comment.