Add open file button to ExpandableBadgeWebShimmerOverlay

This commit is contained in:
Mohamed Boudra
2026-04-27 12:45:29 +07:00
parent 90032570ec
commit e9ba84ec65
+15 -2
View File
@@ -1075,6 +1075,10 @@ const expandableBadgeStylesheet = StyleSheet.create((theme) => ({
borderRadius: theme.borderRadius.md, borderRadius: theme.borderRadius.md,
flexShrink: 0, flexShrink: 0,
}, },
openFileButtonPlaceholderIcon: {
width: 14,
height: 14,
},
chevronExpanded: { chevronExpanded: {
transform: [{ rotate: "90deg" }], transform: [{ rotate: "90deg" }],
}, },
@@ -2138,6 +2142,7 @@ interface ExpandableBadgeWebShimmerOverlayProps {
secondaryLabel?: string; secondaryLabel?: string;
shimmerLabelTextStyle: StyleProp<TextStyle>; shimmerLabelTextStyle: StyleProp<TextStyle>;
shimmerSecondaryTextStyle: StyleProp<TextStyle>; shimmerSecondaryTextStyle: StyleProp<TextStyle>;
showOpenFileButton: boolean;
} }
function ExpandableBadgeWebShimmerOverlay({ function ExpandableBadgeWebShimmerOverlay({
@@ -2145,6 +2150,7 @@ function ExpandableBadgeWebShimmerOverlay({
secondaryLabel, secondaryLabel,
shimmerLabelTextStyle, shimmerLabelTextStyle,
shimmerSecondaryTextStyle, shimmerSecondaryTextStyle,
showOpenFileButton,
}: ExpandableBadgeWebShimmerOverlayProps) { }: ExpandableBadgeWebShimmerOverlayProps) {
return ( return (
<View style={expandableBadgeStylesheet.shimmerOverlay} pointerEvents="none"> <View style={expandableBadgeStylesheet.shimmerOverlay} pointerEvents="none">
@@ -2155,9 +2161,15 @@ function ExpandableBadgeWebShimmerOverlay({
<Text style={shimmerSecondaryTextStyle} numberOfLines={1}> <Text style={shimmerSecondaryTextStyle} numberOfLines={1}>
{secondaryLabel} {secondaryLabel}
</Text> </Text>
) : ( ) : null}
{showOpenFileButton ? (
<View style={expandableBadgeStylesheet.openFileButton}>
<View style={expandableBadgeStylesheet.openFileButtonPlaceholderIcon} />
</View>
) : null}
{!secondaryLabel && !showOpenFileButton ? (
<View style={expandableBadgeStylesheet.spacer} /> <View style={expandableBadgeStylesheet.spacer} />
)} ) : null}
</View> </View>
); );
} }
@@ -2254,6 +2266,7 @@ function ExpandableBadgeLabelRow({
secondaryLabel={secondaryLabel} secondaryLabel={secondaryLabel}
shimmerLabelTextStyle={shimmerLabelTextStyle} shimmerLabelTextStyle={shimmerLabelTextStyle}
shimmerSecondaryTextStyle={shimmerSecondaryTextStyle} shimmerSecondaryTextStyle={shimmerSecondaryTextStyle}
showOpenFileButton={showOpenFileButton}
/> />
) : null} ) : null}
{isNativeShimmer ? ( {isNativeShimmer ? (