Add ButtonProps export (#49593)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49593

Changelog: [Internal]

Reviewed By: huntie

Differential Revision: D69984581

fbshipit-source-id: 1a9607866dee564718081a15f9f6740dfb8dd0e4
This commit is contained in:
Jakub Piasecki
2025-02-24 08:50:19 -08:00
committed by Facebook GitHub Bot
parent 8bce4a37e1
commit c66728dc35
3 changed files with 5 additions and 4 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ import View from './View/View';
import invariant from 'invariant';
import * as React from 'react';
type ButtonProps = $ReadOnly<{
export type ButtonProps = $ReadOnly<{
/**
Text to display inside the button. On Android the given title will be
converted to the uppercased form.
@@ -286,7 +286,7 @@ const Touchable: typeof TouchableNativeFeedback | typeof TouchableOpacity =
type ButtonRef = React.ElementRef<typeof Touchable>;
const Button: component(
ref: React.RefSetter<ButtonRef>,
ref?: React.RefSetter<ButtonRef>,
...props: ButtonProps
) = React.forwardRef((props: ButtonProps, ref: React.RefSetter<ButtonRef>) => {
const {
@@ -1407,7 +1407,7 @@ declare export default typeof ActivityIndicatorViewNativeComponent;
`;
exports[`public API should not change unintentionally Libraries/Components/Button.js 1`] = `
"type ButtonProps = $ReadOnly<{
"export type ButtonProps = $ReadOnly<{
title: string,
onPress: (event?: GestureResponderEvent) => mixed,
touchSoundDisabled?: ?boolean,
@@ -1440,7 +1440,7 @@ declare const Touchable:
| typeof TouchableOpacity;
type ButtonRef = React.ElementRef<typeof Touchable>;
declare const Button: component(
ref: React.RefSetter<ButtonRef>,
ref?: React.RefSetter<ButtonRef>,
...props: ButtonProps
);
declare export default typeof Button;
+1
View File
@@ -37,6 +37,7 @@ const ENTRY_POINTS = [
'packages/react-native/Libraries/Blob/URLSearchParams.js',
'packages/react-native/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js',
'packages/react-native/Libraries/Components/ActivityIndicator/ActivityIndicator.js',
'packages/react-native/Libraries/Components/Button.js',
'packages/react-native/Libraries/Components/Clipboard/Clipboard.js',
'packages/react-native/Libraries/Components/LayoutConformance/LayoutConformance.js',
'packages/react-native/Libraries/Components/ToastAndroid/ToastAndroid.js',