-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the TouchableHighlight component #29654
Update the TouchableHighlight component #29654
Conversation
Base commit: eecb930 |
Base commit: eecb930 |
```jsx | ||
function MyComponent(props) { | ||
return ( | ||
<View {...props} style={{ flex: 1, backgroundColor: '#fff' }}> | ||
<Text>My Component</Text> | ||
</View> | ||
); | ||
} | ||
|
||
<TouchableHighlight | ||
activeOpacity={0.6} | ||
underlayColor="#DDDDDD" | ||
onPress={() => alert('Pressed!')}> | ||
<MyComponent /> | ||
</TouchableHighlight>; | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be indented:
```jsx | |
function MyComponent(props) { | |
return ( | |
<View {...props} style={{ flex: 1, backgroundColor: '#fff' }}> | |
<Text>My Component</Text> | |
</View> | |
); | |
} | |
<TouchableHighlight | |
activeOpacity={0.6} | |
underlayColor="#DDDDDD" | |
onPress={() => alert('Pressed!')}> | |
<MyComponent /> | |
</TouchableHighlight>; | |
``` | |
```jsx | |
function MyComponent(props) { | |
return ( | |
<View {...props} style={{ flex: 1, backgroundColor: '#fff' }}> | |
<Text>My Component</Text> | |
</View> | |
); | |
} | |
<TouchableHighlight | |
activeOpacity={0.6} | |
underlayColor="#DDDDDD" | |
onPress={() => alert('Pressed!')}> | |
<MyComponent /> | |
</TouchableHighlight>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@motiz88 Sorry for that, I've made an amend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except for indentation in the comment.
* Update the title and prop description from docs. * Remove asterisks from the comments. * Add snackplayer example. * Cap comments to 80 characters. * Add platform, default and type annotations.
ffd95dc
to
ad318f4
Compare
This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This PR was closed because it has been stalled for 7 days with no activity. |
Fixes MLH-Fellowship#194
Summary
The PR is part of an effort to update the code comments to match the current documentation on the React Native website. The project is a part of MLH fellowship program and involves automatic generation of the website docs from code comments and flow types as the end result.
To learn more about the project you can visit the project wiki:
Link to the documentation(the source of truth):
Changes
Changelog
[Internal]
Test Plan
All changes are made to the code comments and thus there is no need for testing.