Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
lib/
node_modules/
package-lock.json
package-lock.json
.yarn/
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
46 changes: 46 additions & 0 deletions lib/skeleton-placeholder.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import * as React from 'react';
import { StyleProp, ViewStyle } from 'react-native';
declare type SkeletonPlaceholderProps = {
/**
* Determines component's children.
*/
children: JSX.Element;
/**
* Determines the color of placeholder.
*/
backgroundColor?: string;
/**
* Determines the highlight color of placeholder.
*/
highlightColor?: string;
/**
* Determines the animation speed in milliseconds. Use 0 to disable animation
*/
speed?: number;
/**
* Determines the animation direction, left or right
*/
direction?: 'left' | 'right';
/**
* Determines if Skeleton should show placeholders or its children.
*/
enabled?: boolean;
/**
* Determines default border radius for placeholders from both SkeletonPlaceholder.Item and generated from children.
*/
borderRadius?: number;
angle?: number;
/**
* Determines width of the highlighted area
*/
shimmerWidth?: number;
};
declare type SkeletonPlaceholderItemProps = ViewStyle & {
style?: StyleProp<ViewStyle>;
children?: React.ReactNode;
};
declare const SkeletonPlaceholder: React.FC<SkeletonPlaceholderProps> & {
Item: React.FC<SkeletonPlaceholderItemProps>;
};
export default SkeletonPlaceholder;
//# sourceMappingURL=skeleton-placeholder.d.ts.map
1 change: 1 addition & 0 deletions lib/skeleton-placeholder.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

175 changes: 175 additions & 0 deletions lib/skeleton-placeholder.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/skeleton-placeholder.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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-masked-view/masked-view": "^0.2.8",
"@react-native-masked-view/masked-view": "^0.3.1",
"@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-masked-view/masked-view": "^0.2.8",
"@react-native-masked-view/masked-view": ">=0.2.9",
"react": ">=0.14.8",
"react-native": ">=0.50.1",
"react-native-linear-gradient": "^2.5.6"
}
}
}
Loading