Skip to content

Commit

Permalink
fix: regression on SocialButton component
Browse files Browse the repository at this point in the history
Signed-off-by: clegirar <[email protected]>
  • Loading branch information
clegirar committed Feb 21, 2024
1 parent 77c529c commit c543ca7
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions packages/components/buttons/SocialButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import { SvgProps } from "react-native-svg";

import { BrandText } from "../BrandText";
import { SVG } from "../SVG";
import { SecondaryBox } from "../boxes/SecondaryBox";
import { Box } from "../boxes/Box";

import { neutral22, neutral33, withAlpha } from "@/utils/style/colors";
import { fontMedium14 } from "@/utils/style/fonts";

// TODO: remove uses of Box component directly in other components
export const SocialButton: React.FC<{
text: string;
iconSvg: React.FC<SvgProps>;
Expand All @@ -17,26 +18,32 @@ export const SocialButton: React.FC<{
}> = ({ text, onPress, iconSvg, style }) => {
return (
<TouchableOpacity onPress={onPress} style={style}>
<SecondaryBox
style={{ height: 44, backgroundColor: withAlpha(neutral22, 0.64) }}
<Box
style={{
height: 44,
backgroundColor: withAlpha(neutral22, 0.64),
justifyContent: "center",
}}
>
<View style={{ flexDirection: "row", alignItems: "center" }}>
<SecondaryBox
<Box
style={{
marginLeft: 6,
backgroundColor: neutral33,
borderRadius: 6,
width: 32,
height: 32,
justifyContent: "center",
alignItems: "center",
}}
>
<SVG source={iconSvg} height={20} width={20} />
</SecondaryBox>
</Box>
<BrandText style={[fontMedium14, { marginLeft: 8, marginRight: 16 }]}>
{text}
</BrandText>
</View>
</SecondaryBox>
</Box>
</TouchableOpacity>
);
};

0 comments on commit c543ca7

Please sign in to comment.