47 lines
1.5 KiB
TypeScript
47 lines
1.5 KiB
TypeScript
// Metro module 14109 (f14110).
|
|
import { useEffect } from "react";
|
|
import { createStyles } from "../../../design/components/Styles/native/createStyles";
|
|
import Module712 from "../../../_bundle/Module712";
|
|
import { COLLECTIBLES_SHOP_CARD_WIDTH, COLLECTIBLES_SHOP_CARD_HEIGHT } from "./CollectiblesShopCardV2";
|
|
import ReanimatedRexport, { useSharedValue, withRepeat, useAnimatedStyle } from "../../reanimated/ReanimatedRexport";
|
|
import { withTiming } from "../../../design/animation/reanimated/timing/timing";
|
|
let __initData;
|
|
const useStyles = createStyles((a0, a1) => ({
|
|
skeletonCard: {
|
|
width: a0,
|
|
height: a1,
|
|
backgroundColor: Module712.colors.BORDER_SUBTLE,
|
|
borderRadius: Module712.radii.sm
|
|
}
|
|
}));
|
|
__initData = {
|
|
code: "function SkeletonCardTsx1(){const{opacity}=this.__closure;return{opacity:opacity.get()};}"
|
|
};
|
|
export default (a0) => {
|
|
let width = a0.width;
|
|
if (width === void 0) {
|
|
width = COLLECTIBLES_SHOP_CARD_WIDTH;
|
|
}
|
|
let height = a0.height;
|
|
const style = a0.style;
|
|
if (height == null) {
|
|
height = COLLECTIBLES_SHOP_CARD_HEIGHT;
|
|
}
|
|
const styles = useStyles(width, height);
|
|
const sharedValue = useSharedValue(0.3);
|
|
useEffect(() => {
|
|
sharedValue.set(withRepeat(withTiming(1, {
|
|
duration: 650
|
|
}), -1, true));
|
|
}, [sharedValue]);
|
|
const C = () => ({
|
|
opacity: sharedValue.get()
|
|
});
|
|
C.__closure = {
|
|
opacity: sharedValue
|
|
};
|
|
C.__workletHash = 5620456625640;
|
|
C.__initData = __initData;
|
|
return <ReanimatedRexport.View style={[styles.skeletonCard, style, useAnimatedStyle(C)]} />;
|
|
};
|