Skip to content

Commit 99a07cb

Browse files
gnpricechrisbobbe
authored andcommitted
StreamItem [nfc]: Order styles by where used; clarify a name
Putting these in the same order as where we use them helps make it easy to find the relevant style, and to see related styles together.
1 parent 5b4133e commit 99a07cb

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

src/streams/StreamItem.js

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,18 @@ export default function StreamItem(props: Props): Node {
131131
backgroundColor,
132132
opacity: isMuted ? 0.5 : 1,
133133
},
134+
collapsePressable: {
135+
display: 'flex',
136+
alignItems: 'center',
137+
justifyContent: 'center',
138+
paddingTop: 8,
139+
paddingBottom: 8,
140+
paddingLeft: 8,
141+
paddingRight: 0,
142+
},
143+
collapseIcon: {
144+
marginRight: 8,
145+
},
134146
text: {
135147
flex: 1,
136148
paddingLeft: 8,
@@ -143,18 +155,6 @@ export default function StreamItem(props: Props): Node {
143155
opacity: 0.75,
144156
fontSize: 12,
145157
},
146-
collapseIcon: {
147-
marginRight: 8,
148-
},
149-
pressable: {
150-
display: 'flex',
151-
alignItems: 'center',
152-
justifyContent: 'center',
153-
paddingTop: 8,
154-
paddingBottom: 8,
155-
paddingLeft: 8,
156-
paddingRight: 0,
157-
},
158158
}),
159159
[backgroundColor, handleExpandCollapse, isMuted, textColor],
160160
);
@@ -173,7 +173,10 @@ export default function StreamItem(props: Props): Node {
173173
>
174174
<View style={styles.wrapper}>
175175
{handleExpandCollapse && (
176-
<Pressable style={styles.pressable} onPress={() => handleExpandCollapse(streamId)}>
176+
<Pressable
177+
style={styles.collapsePressable}
178+
onPress={() => handleExpandCollapse(streamId)}
179+
>
177180
{isCollapsed === false ? (
178181
<IconCaretUp style={styles.collapseIcon} size={20} color={iconColor} />
179182
) : (

0 commit comments

Comments
 (0)