Skip to content

Commit 84feebe

Browse files
authored
Merge pull request Expensify#79947 from nyomanjyotisa/issue-79622
Flip the chevron when popover is active
2 parents 8d6114d + 74d261e commit 84feebe

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/components/CaretWrapper.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ type CaretWrapperProps = ChildrenProps & {
1212
style?: StyleProp<ViewStyle>;
1313
caretWidth?: number;
1414
caretHeight?: number;
15+
isActive?: boolean;
1516
};
1617

17-
function CaretWrapper({children, style, caretWidth, caretHeight}: CaretWrapperProps) {
18+
function CaretWrapper({children, style, caretWidth, caretHeight, isActive = false}: CaretWrapperProps) {
1819
const theme = useTheme();
1920
const styles = useThemeStyles();
2021
const expensifyIcons = useMemoizedLazyExpensifyIcons(['DownArrow'] as const);
@@ -27,6 +28,7 @@ function CaretWrapper({children, style, caretWidth, caretHeight}: CaretWrapperPr
2728
fill={theme.icon}
2829
width={caretWidth ?? variables.iconSizeExtraSmall}
2930
height={caretHeight ?? variables.iconSizeExtraSmall}
31+
additionalStyles={isActive ? styles.flipUpsideDown : []}
3032
/>
3133
</View>
3234
);

src/components/Search/FilterDropdowns/DropdownButton.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ function DropdownButton({label, value, viewportOffsetTop, PopoverComponent, medi
141141
style={[styles.flex1, styles.mw100, caretWrapperStyle]}
142142
caretWidth={variables.iconSizeSmall}
143143
caretHeight={variables.iconSizeSmall}
144+
isActive={isOverlayVisible}
144145
>
145146
<Text
146147
numberOfLines={1}

0 commit comments

Comments
 (0)