Skip to content

Commit

Permalink
fix(apps/mobile): use correct color for delete image button in light …
Browse files Browse the repository at this point in the history
…and dark modes
  • Loading branch information
hassankhan committed Oct 13, 2024
1 parent b17aaf6 commit 97da876
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions apps/mobile/src/components/IconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,16 @@ export const IconButton = ({
style,
...props
}: IconButtonProps) => {
const { styles } = useStyles(stylesheet, { rounded });
const { styles, theme } = useStyles(stylesheet, { rounded });

const themedIconProps = {
...iconProps,
color: iconProps.color || theme.colors.typography.$5,
};

return (
<Pressable style={[styles.root, style as StyleProp<ViewStyle>]} {...props}>
<Octicons {...iconProps} />
<Octicons {...themedIconProps} />
</Pressable>
);
};
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/src/features/CatCard/DeleteButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const DeleteButton = ({ item }: CardProps) => {
<IconButton
rounded
disabled={isLoading}
iconProps={{ name: 'trash', size: 24, color: 'black' }}
iconProps={{ name: 'trash', size: 24 }}
onPress={handleDelete}
/>
);
Expand Down

0 comments on commit 97da876

Please sign in to comment.