fix empty project creation and use credit to generate
This commit is contained in:
@@ -29,31 +29,38 @@ const GradientButton = ({
|
||||
size = "medium",
|
||||
textStyle = {},
|
||||
gradientStyle = {},
|
||||
height = null,
|
||||
}) => {
|
||||
const resolvedSize = HEIGHT_BY_SIZE[size] ? size : "medium";
|
||||
const buttonHeight = HEIGHT_BY_SIZE[resolvedSize];
|
||||
const buttonHeight =
|
||||
typeof height === "number" ? height : HEIGHT_BY_SIZE[resolvedSize];
|
||||
const fontSize = FONT_SIZE_BY_SIZE[resolvedSize];
|
||||
|
||||
return (
|
||||
<Pressable
|
||||
onPress={onPress}
|
||||
disabled={disabled}
|
||||
style={{
|
||||
...containerStyle,
|
||||
opacity: disabled ? 0.6 : 1,
|
||||
maxWidth: maxWidth ? maxWidth : null,
|
||||
}}
|
||||
style={[
|
||||
{
|
||||
opacity: disabled ? 0.6 : 1,
|
||||
maxWidth: maxWidth ? maxWidth : null,
|
||||
height: buttonHeight,
|
||||
},
|
||||
containerStyle,
|
||||
]}
|
||||
>
|
||||
<LinearGradient
|
||||
colors={colors}
|
||||
style={{
|
||||
...Style.containerCenter,
|
||||
...Style.containerRow,
|
||||
height: buttonHeight,
|
||||
borderRadius: 14,
|
||||
gap: 10,
|
||||
...gradientStyle,
|
||||
}}
|
||||
style={[
|
||||
{
|
||||
...Style.containerCenter,
|
||||
...Style.containerRow,
|
||||
height: buttonHeight,
|
||||
borderRadius: 14,
|
||||
gap: 10,
|
||||
},
|
||||
gradientStyle,
|
||||
]}
|
||||
start={{ x: 0, y: 0 }}
|
||||
end={{ x: 1, y: 0 }}
|
||||
{...props}
|
||||
|
||||
Reference in New Issue
Block a user