File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,10 @@ type Props = React.ElementConfig<typeof Surface> & {|
3636 * @optional
3737 */
3838 theme : Theme ,
39+ /**
40+ * Pass down testID from card props to touchable
41+ */
42+ testID ? : string ,
3943| } ;
4044
4145type State = {
@@ -112,6 +116,7 @@ class Card extends React.Component<Props, State> {
112116 onPress,
113117 style,
114118 theme,
119+ testID,
115120 ...rest
116121 } = this . props ;
117122 const { elevation } = this . state ;
@@ -136,6 +141,7 @@ class Card extends React.Component<Props, State> {
136141 onPress = { onPress }
137142 onPressIn = { onPress ? this . _handlePressIn : undefined }
138143 onPressOut = { onPress ? this . _handlePressOut : undefined }
144+ testID = { testID }
139145 >
140146 < View style = { styles . innerContainer } >
141147 { React . Children . map (
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ export interface CardProps {
1919 children : React . ReactNode ;
2020 style ?: any ;
2121 theme ?: ThemeShape ;
22+ testID ?: string ;
2223}
2324
2425export declare class Card extends React . Component < CardProps > {
You can’t perform that action at this time.
0 commit comments