Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default function ClickableStress() {
activeUnderlayOpacity={0.105}
style={[styles.startButton, isRunning && styles.startButtonBusy]}
onPress={start}
enabled={!isRunning}>
disabled={isRunning}>
<Text style={styles.startButtonText}>
{isRunning ? `Running ${currentRun}/${N}...` : 'Start test'}
</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const Clickable = (props: ClickableProps) => {
onPressOut,
onActiveStateChange,
children,
disabled = false,
ref,
...rest
} = props;
Expand Down Expand Up @@ -115,6 +116,7 @@ export const Clickable = (props: ClickableProps) => {
{...rest}
{...rippleProps}
ref={ref ?? null}
enabled={!disabled}
onBegin={onBegin}
onActivate={onActivate}
onDeactivate={onDeactivate}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type PressableAndroidRippleConfig = {

type RippleProps = 'rippleColor' | 'rippleRadius' | 'borderless' | 'foreground';

export type ClickableProps = Omit<ButtonProps, RippleProps> &
export type ClickableProps = Omit<ButtonProps, RippleProps | 'enabled'> &
Omit<BaseButtonProps, keyof RawButtonProps> & {
Comment on lines +18 to 19
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change removes enabled from the public ClickableProps type. If the goal is to rename rather than hard-remove, consider keeping enabled?: boolean as a deprecated alias for at least one release (with disabled taking precedence) to provide a smoother migration path for TypeScript users and to align with any runtime backward-compat handling.

Copilot uses AI. Check for mistakes.
/**
* Configuration for the ripple effect on Android.
Expand All @@ -31,4 +31,9 @@ export type ClickableProps = Omit<ButtonProps, RippleProps> &
* Called when pointer is released from the component.
*/
onPressOut?: ((event: CallbackEventType) => void) | undefined;

/**
* Whether the component should ignore touches. By default set to false.
*/
disabled?: boolean | undefined;
};
Loading