fix tickets add reort mail and design fixes
This commit is contained in:
@@ -5,6 +5,18 @@ import { FONT_FAMILY } from "../styles/Fonts";
|
||||
import { size } from "../styles/Style";
|
||||
import { LinearGradient } from "./LinearGradient/LinearGradient";
|
||||
|
||||
const HEIGHT_BY_SIZE = {
|
||||
small: 44,
|
||||
medium: 50,
|
||||
large: 58,
|
||||
};
|
||||
|
||||
const FONT_SIZE_BY_SIZE = {
|
||||
small: 14,
|
||||
medium: 15,
|
||||
large: 17,
|
||||
};
|
||||
|
||||
const GradientButton = ({
|
||||
title = "",
|
||||
colors = ["#F94697", "#7023F7"],
|
||||
@@ -14,7 +26,14 @@ const GradientButton = ({
|
||||
icon,
|
||||
disabled = false,
|
||||
maxWidth = null,
|
||||
size = "medium",
|
||||
textStyle = {},
|
||||
gradientStyle = {},
|
||||
}) => {
|
||||
const resolvedSize = HEIGHT_BY_SIZE[size] ? size : "medium";
|
||||
const buttonHeight = HEIGHT_BY_SIZE[resolvedSize];
|
||||
const fontSize = FONT_SIZE_BY_SIZE[resolvedSize];
|
||||
|
||||
return (
|
||||
<Pressable
|
||||
onPress={onPress}
|
||||
@@ -30,9 +49,10 @@ const GradientButton = ({
|
||||
style={{
|
||||
...Style.containerCenter,
|
||||
...Style.containerRow,
|
||||
height: 50,
|
||||
height: buttonHeight,
|
||||
borderRadius: 14,
|
||||
gap: 10,
|
||||
...gradientStyle,
|
||||
}}
|
||||
start={{ x: 0, y: 0 }}
|
||||
end={{ x: 1, y: 0 }}
|
||||
@@ -41,10 +61,11 @@ const GradientButton = ({
|
||||
{icon && <Image source={icon} style={size({ size: 16 })} />}
|
||||
<Text
|
||||
style={{
|
||||
fontSize: 15,
|
||||
fontSize,
|
||||
color: Palette.white,
|
||||
fontFamily: FONT_FAMILY.InterMedium,
|
||||
paddingHorizontal: 10,
|
||||
...textStyle,
|
||||
}}
|
||||
>
|
||||
{title}
|
||||
|
||||
Reference in New Issue
Block a user