Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ishpaul777 committed Jan 6, 2024
1 parent 308221f commit 2d75fb8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/components/ReportActionItem/ActionableItemButtons.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import {View} from 'react-native';
import Button from '@components/Button';
import withLocalize, {WithLocalizeProps} from '@components/withLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
import {TranslationPaths} from '@src/languages/types';
import useLocalize from '@hooks/useLocalize';

type ActionableItem = {
isPrimary?: boolean;
Expand All @@ -12,12 +12,13 @@ type ActionableItem = {
text: TranslationPaths;
};

type ActionableItemButtonsProps = WithLocalizeProps & {
type ActionableItemButtonsProps = {
items: ActionableItem[];
};

function ActionableItemButtons(props: ActionableItemButtonsProps) {
const styles = useThemeStyles();
const {translate} = useLocalize();

return (
<View style={[styles.flexRow, styles.gap4]}>
Expand All @@ -26,7 +27,7 @@ function ActionableItemButtons(props: ActionableItemButtonsProps) {
key={item.key}
style={[styles.mt2]}
onPress={item.onPress}
text={props.translate(item.text)}
text={translate(item.text)}
small
success={item.isPrimary}
/>
Expand All @@ -37,5 +38,5 @@ function ActionableItemButtons(props: ActionableItemButtonsProps) {

ActionableItemButtons.displayName = 'ActionableItemButtton';

export default withLocalize(ActionableItemButtons);
export default ActionableItemButtons;
export type {ActionableItem};

0 comments on commit 2d75fb8

Please sign in to comment.