mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
8bce4a37e1
commit
c66728dc35
+2
-2
@@ -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;
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user