Skip to content

Commit cddc2f9

Browse files
committed
UserGroupItem [nfc]: Inline styles.listItem here
1 parent b641016 commit cddc2f9

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/user-groups/UserGroupItem.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/* @flow strict-local */
2-
import React, { useCallback, useContext } from 'react';
2+
import React, { useCallback, useContext, useMemo } from 'react';
33
import type { Node } from 'react';
44
import { View } from 'react-native';
55

66
import { IconPeople } from '../common/Icons';
77
import ZulipText from '../common/ZulipText';
88
import Touchable from '../common/Touchable';
9-
import styles, { createStyleSheet, ThemeContext } from '../styles';
9+
import { createStyleSheet, ThemeContext } from '../styles';
1010

1111
const 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

0 commit comments

Comments
 (0)