Skip to content

Commit

Permalink
fix: pass down accessible from Card props to Touchable for Appium tes…
Browse files Browse the repository at this point in the history
…ts (#812)
  • Loading branch information
t-d-o-g authored and ferrannp committed Feb 21, 2019
1 parent ade8d27 commit d29eb93
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/Card/Card.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ type Props = React.ElementConfig<typeof Surface> & {|
* Pass down testID from card props to touchable
*/
testID?: string,
/**
* Pass down accessible from card props to touchable
*/
accessible?: boolean,
|};

type State = {
Expand Down Expand Up @@ -121,6 +125,7 @@ class Card extends React.Component<Props, State> {
style,
theme,
testID,
accessible,
...rest
} = this.props;
const { elevation } = this.state;
Expand All @@ -146,6 +151,7 @@ class Card extends React.Component<Props, State> {
onPressIn={onPress ? this._handlePressIn : undefined}
onPressOut={onPress ? this._handlePressOut : undefined}
testID={testID}
accessible={accessible}
>
<View style={styles.innerContainer}>
{React.Children.map(
Expand Down
1 change: 1 addition & 0 deletions typings/components/Card.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export interface CardProps {
style?: any;
theme?: ThemeShape;
testID?: string;
accessible?: boolean;
}

export declare class Card extends React.Component<CardProps> {
Expand Down

0 comments on commit d29eb93

Please sign in to comment.