more fixes

This commit is contained in:
Hailey
2024-10-02 11:55:00 -07:00
parent f365ae004a
commit ca0888c633
6 changed files with 14 additions and 10 deletions
+4 -4
View File
@@ -87,7 +87,7 @@ export type ButtonProps = Pick<
style?: StyleProp<ViewStyle>
hoverStyle?: StyleProp<ViewStyle>
children: NonTextElements | ((context: ButtonContext) => NonTextElements)
Component?: React.ComponentType<PressableProps>
PressableComponent?: React.ComponentType<PressableProps>
}
export type ButtonTextProps = TextProps &
@@ -117,7 +117,7 @@ export const Button = React.forwardRef<View, ButtonProps>(
disabled = false,
style,
hoverStyle: hoverStyleProp,
Component = Pressable,
PressableComponent = Pressable,
...rest
},
ref,
@@ -239,7 +239,7 @@ export const Button = React.forwardRef<View, ButtonProps>(
const flattenedBaseStyles = flatten([baseStyles, style])
return (
<Component
<PressableComponent
role="button"
accessibilityHint={undefined} // optional
{...rest}
@@ -290,7 +290,7 @@ export const Button = React.forwardRef<View, ButtonProps>(
<Context.Provider value={context}>
{typeof children === 'function' ? children(context) : children}
</Context.Provider>
</Component>
</PressableComponent>
)
},
)