fix: resolve typescript and build errors across admin and guest apps
This commit is contained in:
@@ -85,6 +85,9 @@ export function CTAButton({
|
||||
fullWidth = true,
|
||||
disabled = false,
|
||||
loading = false,
|
||||
style,
|
||||
iconLeft,
|
||||
iconRight,
|
||||
}: {
|
||||
label: string;
|
||||
onPress: () => void;
|
||||
@@ -92,6 +95,9 @@ export function CTAButton({
|
||||
fullWidth?: boolean;
|
||||
disabled?: boolean;
|
||||
loading?: boolean;
|
||||
style?: any;
|
||||
iconLeft?: React.ReactNode;
|
||||
iconRight?: React.ReactNode;
|
||||
}) {
|
||||
const { primary, surface, border, text, danger } = useAdminTheme();
|
||||
const isPrimary = tone === 'primary';
|
||||
@@ -108,6 +114,7 @@ export function CTAButton({
|
||||
width: fullWidth ? '100%' : undefined,
|
||||
flex: fullWidth ? undefined : 1,
|
||||
opacity: isDisabled ? 0.6 : 1,
|
||||
...style,
|
||||
}}
|
||||
>
|
||||
<XStack
|
||||
@@ -118,10 +125,13 @@ export function CTAButton({
|
||||
backgroundColor={backgroundColor}
|
||||
borderWidth={isPrimary || isDanger ? 0 : 1}
|
||||
borderColor={borderColor}
|
||||
space="$2"
|
||||
>
|
||||
{iconLeft}
|
||||
<Text fontSize="$sm" fontWeight="800" color={labelColor}>
|
||||
{label}
|
||||
</Text>
|
||||
{iconRight}
|
||||
</XStack>
|
||||
</Pressable>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user