File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 11/* @flow strict-local */
2- import React , { useCallback , useContext } from 'react' ;
2+ import React , { useCallback , useContext , useMemo } from 'react' ;
33import type { Node } from 'react' ;
44import { View } from 'react-native' ;
55
66import { IconPeople } from '../common/Icons' ;
77import ZulipText from '../common/ZulipText' ;
88import Touchable from '../common/Touchable' ;
9- import styles , { createStyleSheet , ThemeContext } from '../styles' ;
9+ import { createStyleSheet , ThemeContext } from '../styles' ;
1010
1111const componentStyles = createStyleSheet ( {
1212 text : {
@@ -36,9 +36,21 @@ export default function UserGroupItem(props: Props): Node {
3636
3737 const themeContext = useContext ( ThemeContext ) ;
3838
39+ const styles = useMemo (
40+ ( ) => ( {
41+ wrapper : {
42+ flexDirection : 'row' ,
43+ alignItems : 'center' ,
44+ paddingVertical : 8 ,
45+ paddingHorizontal : 16 ,
46+ } ,
47+ } ) ,
48+ [ ] ,
49+ ) ;
50+
3951 return (
4052 < Touchable onPress = { handlePress } >
41- < View style = { styles . listItem } >
53+ < View style = { styles . wrapper } >
4254 < IconPeople size = { 32 } color = { themeContext . color } />
4355 < View style = { componentStyles . textWrapper } >
4456 < ZulipText
You can’t perform that action at this time.
0 commit comments