File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed
packages/react-native/Libraries
scripts/build/build-types Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ import View from './View/View';
2727import invariant from 'invariant' ;
2828import * as React from 'react' ;
2929
30- type ButtonProps = $ReadOnly < {
30+ export type ButtonProps = $ReadOnly < {
3131 /**
3232 Text to display inside the button. On Android the given title will be
3333 converted to the uppercased form.
@@ -286,7 +286,7 @@ const Touchable: typeof TouchableNativeFeedback | typeof TouchableOpacity =
286286type ButtonRef = React . ElementRef < typeof Touchable > ;
287287
288288const Button : component (
289- ref : React . RefSetter < ButtonRef > ,
289+ ref ? : React . RefSetter < ButtonRef > ,
290290 ...props : ButtonProps
291291) = React . forwardRef ( ( props : ButtonProps , ref : React . RefSetter < ButtonRef > ) => {
292292 const {
Original file line number Diff line number Diff line change @@ -1407,7 +1407,7 @@ declare export default typeof ActivityIndicatorViewNativeComponent;
14071407`;
14081408
14091409exports[`public API should not change unintentionally Libraries/Components/Button.js 1`] = `
1410- "type ButtonProps = $ReadOnly<{
1410+ "export type ButtonProps = $ReadOnly<{
14111411 title: string,
14121412 onPress: (event?: GestureResponderEvent) => mixed,
14131413 touchSoundDisabled?: ?boolean,
@@ -1440,7 +1440,7 @@ declare const Touchable:
14401440 | typeof TouchableOpacity;
14411441type ButtonRef = React.ElementRef<typeof Touchable>;
14421442declare const Button: component(
1443- ref: React.RefSetter<ButtonRef>,
1443+ ref? : React.RefSetter<ButtonRef>,
14441444 ...props: ButtonProps
14451445);
14461446declare export default typeof Button;
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ const ENTRY_POINTS = [
3737 'packages/react-native/Libraries/Blob/URLSearchParams.js' ,
3838 'packages/react-native/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js' ,
3939 'packages/react-native/Libraries/Components/ActivityIndicator/ActivityIndicator.js' ,
40+ 'packages/react-native/Libraries/Components/Button.js' ,
4041 'packages/react-native/Libraries/Components/Clipboard/Clipboard.js' ,
4142 'packages/react-native/Libraries/Components/LayoutConformance/LayoutConformance.js' ,
4243 'packages/react-native/Libraries/Components/ToastAndroid/ToastAndroid.js' ,
You can’t perform that action at this time.
0 commit comments