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 @@ -62,6 +62,10 @@ type Props = React.ElementConfig<typeof Surface> & {|
6262 * @optional
6363 */
6464 theme : Theme ,
65+ /**
66+ * Pass down testID from chip props to touchable for Detox tests.
67+ */
68+ testID ? : string ,
6569| } ;
6670
6771type State = {
@@ -132,6 +136,7 @@ class Chip extends React.Component<Props, State> {
132136 onClose,
133137 style,
134138 theme,
139+ testID,
135140 ...rest
136141 } = this . props ;
137142 const { dark, colors } = theme ;
@@ -210,6 +215,7 @@ class Chip extends React.Component<Props, State> {
210215 accessibilityComponentType = "button"
211216 accessibilityRole = "button"
212217 accessibilityStates = { accessibilityStates }
218+ testID = { testID }
213219 >
214220 < View style = { styles . content } >
215221 { avatar && ! icon ? (
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ export interface ChipProps {
1313 onClose ?: ( ) => any ;
1414 style ?: any ;
1515 theme ?: ThemeShape ;
16+ testID ?: string ;
1617}
1718
1819export declare class Chip extends React . Component < ChipProps > { }
You can’t perform that action at this time.
0 commit comments