fix tickets add reort mail and design fixes
This commit is contained in:
@@ -6,6 +6,18 @@ import { FONT_FAMILY } from "../styles/Fonts";
|
||||
import { size } from "../styles/Style";
|
||||
import BorderGradient from "./BorderGradient/BorderGradient";
|
||||
|
||||
const HEIGHT_BY_SIZE = {
|
||||
small: 40,
|
||||
medium: 50,
|
||||
large: 58,
|
||||
};
|
||||
|
||||
const FONT_SIZE_BY_SIZE = {
|
||||
small: 13,
|
||||
medium: 15,
|
||||
large: 17,
|
||||
};
|
||||
|
||||
const BorderGradientButton = ({
|
||||
title = "J’ai déjà mes paroles",
|
||||
onPress,
|
||||
@@ -15,7 +27,13 @@ const BorderGradientButton = ({
|
||||
tint = "dark",
|
||||
disabled = false,
|
||||
maxWidth = null,
|
||||
size = "medium",
|
||||
}) => {
|
||||
const resolvedSize = HEIGHT_BY_SIZE[size] ? size : "medium";
|
||||
const buttonHeight = HEIGHT_BY_SIZE[resolvedSize];
|
||||
const fontSize = FONT_SIZE_BY_SIZE[resolvedSize];
|
||||
const iconSize = resolvedSize === "small" ? 14 : 16;
|
||||
|
||||
return (
|
||||
<Pressable
|
||||
onPress={onPress}
|
||||
@@ -34,7 +52,7 @@ const BorderGradientButton = ({
|
||||
locations: [0, 1],
|
||||
}}
|
||||
style={{
|
||||
height: 50,
|
||||
height: buttonHeight,
|
||||
borderRadius: 14,
|
||||
borderWidth: 1,
|
||||
zIndex: 1,
|
||||
@@ -61,10 +79,10 @@ const BorderGradientButton = ({
|
||||
gap: 11,
|
||||
}}
|
||||
>
|
||||
{icon && <Image source={icon} style={size({ size: 16 })} />}
|
||||
{icon && <Image source={icon} style={size({ size: iconSize })} />}
|
||||
<Text
|
||||
style={{
|
||||
fontSize: 15,
|
||||
fontSize,
|
||||
color: Palette.white,
|
||||
fontFamily: FONT_FAMILY.InterMedium,
|
||||
...titleStyle,
|
||||
|
||||
Reference in New Issue
Block a user