diff --git a/src/skeleton-placeholder.tsx b/src/skeleton-placeholder.tsx index 0c20686..d22e1b3 100644 --- a/src/skeleton-placeholder.tsx +++ b/src/skeleton-placeholder.tsx @@ -50,6 +50,7 @@ type SkeletonPlaceholderProps = { * Determines width of the highlighted area */ shimmerWidth?: number; + testID?: string; }; type SkeletonPlaceholderItemProps = ViewStyle & { @@ -68,6 +69,7 @@ const SkeletonPlaceholder: React.FC & { direction = 'right', borderRadius, shimmerWidth, + testID, }) => { const [layout, setLayout] = React.useState(); const animatedValueRef = React.useRef(new Animated.Value(0)); @@ -125,13 +127,13 @@ const SkeletonPlaceholder: React.FC & { if (!enabled || !placeholders) return children; if (!layout?.width || !layout.height) - return setLayout(event.nativeEvent.layout)}>{placeholders}; + return setLayout(event.nativeEvent.layout)}>{placeholders}; // https://github.com/react-native-linear-gradient/react-native-linear-gradient/issues/358 // to make transparent gradient we need to use original color with alpha return ( - + {isAnimationReady && highlightColor !== undefined && transparentColor !== undefined && (