Fix TypeScript typecheck errors
This commit is contained in:
@@ -98,7 +98,7 @@ export function CTAButton({
|
||||
iconRight,
|
||||
}: {
|
||||
label: string;
|
||||
onPress: () => void;
|
||||
onPress?: () => void;
|
||||
tone?: 'primary' | 'ghost' | 'danger';
|
||||
fullWidth?: boolean;
|
||||
disabled?: boolean;
|
||||
@@ -110,7 +110,7 @@ export function CTAButton({
|
||||
const { primary, surface, border, text, danger, glassSurfaceStrong } = useAdminTheme();
|
||||
const isPrimary = tone === 'primary';
|
||||
const isDanger = tone === 'danger';
|
||||
const isDisabled = disabled || loading;
|
||||
const isDisabled = disabled || loading || !onPress;
|
||||
const backgroundColor = isDanger ? danger : isPrimary ? primary : glassSurfaceStrong ?? surface;
|
||||
const borderColor = isPrimary || isDanger ? 'transparent' : border;
|
||||
const labelColor = isPrimary || isDanger ? 'white' : text;
|
||||
|
||||
Reference in New Issue
Block a user