1
1
import { Component , ComponentType , ReactNode } from 'react' ;
2
- import { TextStyle , ViewStyle , View } from 'react-native' ;
2
+ import { TextStyle , ViewStyle , View , StyleProp } from 'react-native' ;
3
3
4
4
export interface CommonHeaderButtonProps {
5
5
/**
@@ -25,11 +25,11 @@ export interface CommonHeaderButtonProps {
25
25
/**
26
26
* Style to apply to the button (icon and text).
27
27
*/
28
- buttonStyle ?: TextStyle | ViewStyle ;
28
+ buttonStyle ?: StyleProp < TextStyle | ViewStyle > ;
29
29
/**
30
30
* Style to apply to the touchable element that wraps the button.
31
31
*/
32
- buttonWrapperStyle ?: ViewStyle ;
32
+ buttonWrapperStyle ?: StyleProp < ViewStyle > ;
33
33
/**
34
34
* ID to locate the view in e2e tests.
35
35
*/
@@ -73,8 +73,8 @@ export interface HeaderItemProps extends CommonHeaderButtonProps {
73
73
74
74
export interface onOverflowMenuPressParams {
75
75
hiddenButtons : Array < ReactNode > ;
76
- overflowButtonRef : ? View ;
77
- cancelButtonLabel : ? string ;
76
+ overflowButtonRef ?: View ;
77
+ cancelButtonLabel ?: string ;
78
78
}
79
79
80
80
export interface HeaderButtonsProps {
@@ -102,7 +102,7 @@ export interface HeaderButtonsProps {
102
102
*
103
103
* There are some default styles set, as seen in `OverflowButton.js`
104
104
*/
105
- overflowButtonWrapperStyle ?: ViewStyle ;
105
+ overflowButtonWrapperStyle ?: StyleProp < ViewStyle > ;
106
106
/**
107
107
* Function that is called when overflow menu is pressed.
108
108
*
0 commit comments