Skip to content

Commit

Permalink
LightboxHeader: Center "x" button vertically.
Browse files Browse the repository at this point in the history
That is, center it in the content area of the header, not including
the space in the top inset. Like what the three-dots icon in the
footer does.

The `alignSelf` property was effectively being ignored; now, it's
not.
  • Loading branch information
chrisbobbe authored and Gautam-Arora24 committed Feb 2, 2021
1 parent 74b32ac commit e02371c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lightbox/LightboxHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ const styles = createStyleSheet({
color: 'white',
fontSize: 12,
},
rightIconTouchTarget: {
alignSelf: 'center',
},
rightIcon: {
fontSize: 28,
alignSelf: 'center',
},
wrapper: {
flex: 1,
Expand Down Expand Up @@ -71,7 +73,7 @@ export default class LightboxHeader extends PureComponent<Props> {
{subheader}
</Text>
</View>
<Touchable onPress={onPressBack}>
<Touchable style={styles.rightIconTouchTarget} onPress={onPressBack}>
<Icon style={styles.rightIcon} color="white" name="x" />
</Touchable>
</View>
Expand Down

0 comments on commit e02371c

Please sign in to comment.