Skip to content

Commit

Permalink
NavButton [nfc]: Bring out componentStyles.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbobbe authored and gnprice committed Aug 12, 2021
1 parent 54e7b55 commit fa3c3fc
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/nav/NavButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ type Props = $ReadOnly<{|
accessibilityLabel?: string,
|}>;

const componentStyles = createStyleSheet({
navButtonIcon: {
textAlign: 'center',
},
});

export default class NavButton extends PureComponent<Props> {
static defaultProps = {
color: BRAND_COLOR,
};

styles = createStyleSheet({
navButtonIcon: {
textAlign: 'center',
},
});

render() {
const { name, style, color, onPress, accessibilityLabel } = this.props;

return (
<NavButtonGeneral onPress={onPress} accessibilityLabel={accessibilityLabel}>
<Icon size={24} style={[this.styles.navButtonIcon, style]} color={color} name={name} />
<Icon size={24} style={[componentStyles.navButtonIcon, style]} color={color} name={name} />
</NavButtonGeneral>
);
}
Expand Down

0 comments on commit fa3c3fc

Please sign in to comment.