Skip to content

Commit 486d9ca

Browse files
committed
✨ Remove intensity prop and move back to default animation as shiver
1 parent 18f6158 commit 486d9ca

File tree

2 files changed

+10
-15
lines changed

2 files changed

+10
-15
lines changed

src/Constants.ts

+9-11
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,15 @@ export interface ISkeletonContentProps {
2121
containerStyle?: StyleProp<ViewStyle>;
2222
animationType?: 'none' | 'shiver' | 'pulse';
2323
animationDirection?:
24-
| 'horizontalLeft'
25-
| 'horizontalRight'
26-
| 'verticalTop'
27-
| 'verticalDown'
28-
| 'diagonalDownLeft'
29-
| 'diagonalDownRight'
30-
| 'diagonalTopLeft'
31-
| 'diagonalTopRight';
24+
| 'horizontalLeft'
25+
| 'horizontalRight'
26+
| 'verticalTop'
27+
| 'verticalDown'
28+
| 'diagonalDownLeft'
29+
| 'diagonalDownRight'
30+
| 'diagonalTopLeft'
31+
| 'diagonalTopRight';
3232
boneColor?: string;
33-
intensity?: number;
3433
highlightColor?: string;
3534
easing?: any;
3635
}
@@ -42,10 +41,9 @@ export interface IDirection {
4241

4342
export const DEFAULT_BORDER_RADIUS: number = 4;
4443
export const DEFAULT_DURATION: number = 1200;
45-
export const DEFAULT_ANIMATION_TYPE: animationType = 'pulse';
44+
export const DEFAULT_ANIMATION_TYPE: animationType = 'shiver';
4645
export const DEFAULT_ANIMATION_DIRECTION: animationDirection = 'horizontalRight';
4746
export const DEFAULT_BONE_COLOR: string = '#E1E9EE';
4847
export const DEFAULT_HIGHLIGHT_COLOR: string = '#F2F8FC';
4948
export const DEFAULT_EASING: any = Easing.bezier(0.5, 0, 0.25, 1);
50-
export const DEFAULT_INTENSITY = 0.6;
5149
export const DEFAULT_LOADING = true;

src/SkeletonContent.tsx

+1-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
DEFAULT_EASING,
1212
DEFAULT_DURATION,
1313
DEFAULT_HIGHLIGHT_COLOR,
14-
DEFAULT_INTENSITY,
1514
DEFAULT_LOADING,
1615
ISkeletonContentProps,
1716
IDirection,
@@ -58,7 +57,6 @@ const SkeletonContent: React.FunctionComponent<ISkeletonContentProps> = ({
5857
animationDirection,
5958
animationType,
6059
easing,
61-
intensity,
6260
children
6361
}) => {
6462

@@ -278,8 +276,7 @@ SkeletonContent.defaultProps = {
278276
animationDirection: DEFAULT_ANIMATION_DIRECTION,
279277
isLoading: DEFAULT_LOADING,
280278
boneColor: DEFAULT_BONE_COLOR,
281-
highlightColor: DEFAULT_HIGHLIGHT_COLOR,
282-
intensity: DEFAULT_INTENSITY
279+
highlightColor: DEFAULT_HIGHLIGHT_COLOR
283280
}
284281

285282
export default SkeletonContent;

0 commit comments

Comments
 (0)