-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8409 from Tushu17/make-avatar-pressable
make avatar and welcome message pressable
- Loading branch information
Showing
5 changed files
with
45 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,21 @@ | ||
import React from 'react'; | ||
import {View} from 'react-native'; | ||
import PropTypes from 'prop-types'; | ||
|
||
// We can't use the common component for the Tooltip as Web implementation uses DOM specific method to | ||
// render the View which is not present on the Mobile. | ||
const propTypes = { | ||
/** Styles to be assigned to the Tooltip wrapper views */ | ||
containerStyles: PropTypes.arrayOf(PropTypes.object), | ||
|
||
/** Children to wrap with Tooltip. */ | ||
children: PropTypes.node.isRequired, | ||
}; | ||
|
||
const defaultProps = { | ||
containerStyles: [], | ||
}; | ||
|
||
/** | ||
* @param {propTypes} props | ||
* @returns {ReactNodeLike} | ||
*/ | ||
const Tooltip = props => ( | ||
<View style={props.containerStyles}> | ||
{props.children} | ||
</View> | ||
props.children | ||
); | ||
|
||
Tooltip.propTypes = propTypes; | ||
Tooltip.defaultProps = defaultProps; | ||
Tooltip.displayName = 'Tooltip'; | ||
|
||
export default Tooltip; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters