Fix tab index of interactive base
This commit is contained in:
@@ -242,6 +242,7 @@ const InteractiveBase: React.FC<InteractiveBaseProps> = ({
|
||||
<Animated.View style={[style, isDisabled ? disableStyle : animatedStyle]}>
|
||||
<Pressable
|
||||
focusable={focusable}
|
||||
tabIndex={focusable ? 0 : -1}
|
||||
disabled={isDisabled}
|
||||
onHoverIn={handleMouseEnter}
|
||||
onPressIn={handlePressIn}
|
||||
|
||||
32
front/rnw.d.ts
vendored
Normal file
32
front/rnw.d.ts
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
import React from "react";
|
||||
import "react-native";
|
||||
|
||||
declare module "react-native" {
|
||||
interface PressableStateCallbackType {
|
||||
hovered?: boolean;
|
||||
focused?: boolean;
|
||||
}
|
||||
interface AccessibilityProps {
|
||||
tabIndex?: number;
|
||||
}
|
||||
interface ViewStyle {
|
||||
transitionProperty?: string;
|
||||
transitionDuration?: string;
|
||||
}
|
||||
interface TextProps {
|
||||
href?: string;
|
||||
hrefAttrs?: {
|
||||
rel?: "noreferrer";
|
||||
target?: string;
|
||||
};
|
||||
}
|
||||
interface ViewProps {
|
||||
dataSet?: Record<string, string>;
|
||||
href?: string;
|
||||
hrefAttrs?: {
|
||||
rel: "noreferrer";
|
||||
target?: "_blank";
|
||||
};
|
||||
onClick?: (e: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user