File tree Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Expand file tree Collapse file tree 1 file changed +40
-0
lines changed Original file line number Diff line number Diff line change
1
+ import React , { memo } from 'react' ;
2
+ import PropTypes from 'prop-types' ;
3
+ import { Image , View } from 'react-native' ;
4
+ import styles from '../styles/styles' ;
5
+ import Tooltip from './Tooltip' ;
6
+
7
+ const propTypes = {
8
+ /** Array of avatar URL */
9
+ avatarImageURLs : PropTypes . arrayOf ( PropTypes . string ) . isRequired ,
10
+
11
+ /** Tooltip for the Avatar */
12
+ avatarTooltips : PropTypes . arrayOf ( PropTypes . string ) . isRequired ,
13
+ } ;
14
+
15
+ const SubscriptAvatar = props => (
16
+ < View style = { styles . emptyAvatar } >
17
+ < Tooltip text = { props . avatarTooltips [ 0 ] } absolute >
18
+ < Image
19
+ source = { { uri : props . avatarImageURLs [ 0 ] } }
20
+ style = { styles . avatarNormal }
21
+ />
22
+ </ Tooltip >
23
+ < View
24
+ style = { [
25
+ styles . secondAvatarSubscript ,
26
+ styles . secondAvatarHovered ,
27
+ ] }
28
+ >
29
+ < Tooltip text = { props . avatarTooltips [ 1 ] } absolute >
30
+ < Image
31
+ source = { { uri : props . avatarImageURLs [ 1 ] } }
32
+ style = { styles . singleSubscript }
33
+ />
34
+ </ Tooltip >
35
+ </ View >
36
+ </ View >
37
+ ) ;
38
+
39
+ SubscriptAvatar . propTypes = propTypes ;
40
+ export default memo ( SubscriptAvatar ) ;
You can’t perform that action at this time.
0 commit comments