Skip to content

Commit

Permalink
NavButtonGeneral [nfc]: Convert to function component.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbobbe authored and gnprice committed Jul 28, 2021
1 parent a0d5cb7 commit 2a55fba
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/nav/NavButtonGeneral.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* @flow strict-local */
import React, { PureComponent } from 'react';
import React from 'react';
import type { Node } from 'react';
import { View } from 'react-native';

Expand All @@ -21,14 +21,12 @@ const componentStyles = createStyleSheet({
},
});

export default class NavButtonGeneral extends PureComponent<Props> {
render() {
const { children, onPress, accessibilityLabel } = this.props;
export default function NavButtonGeneral(props: Props) {
const { children, onPress, accessibilityLabel } = props;

return (
<Touchable onPress={onPress} accessibilityLabel={accessibilityLabel}>
<View style={componentStyles.navButtonFrame}>{children}</View>
</Touchable>
);
}
return (
<Touchable onPress={onPress} accessibilityLabel={accessibilityLabel}>
<View style={componentStyles.navButtonFrame}>{children}</View>
</Touchable>
);
}

0 comments on commit 2a55fba

Please sign in to comment.