Skip to content

Commit

Permalink
Extract menu label outside the component
Browse files Browse the repository at this point in the history
  • Loading branch information
Alejandro Fernández Gómez committed Mar 26, 2020
1 parent d6de0d4 commit 0da6be8
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ interface LogEntryActionsColumnProps {
onViewDetails: () => void;
}

const MENU_LABEL = i18n.translate('xpack.infra.logEntryItemView.logEntryActionsMenuToolTip', {
defaultMessage: 'View Details',
});

export const LogEntryActionsColumn: React.FC<LogEntryActionsColumnProps> = ({
isHovered,
isMenuOpen,
Expand All @@ -39,14 +43,10 @@ export const LogEntryActionsColumn: React.FC<LogEntryActionsColumnProps> = ({
onViewDetails();
}, [onCloseMenu, onViewDetails]);

const label = i18n.translate('xpack.infra.logEntryItemView.logEntryActionsMenuToolTip', {
defaultMessage: 'View Details',
});

const button = (
<ButtonWrapper>
<EuiButtonIcon
aria-label={label}
aria-label={MENU_LABEL}
color="ghost"
iconType="boxesHorizontal"
onClick={onOpenMenu}
Expand Down

0 comments on commit 0da6be8

Please sign in to comment.