Skip to content

Commit

Permalink
ternary fix
Browse files Browse the repository at this point in the history
  • Loading branch information
thompsongl committed Oct 30, 2020
1 parent 5e4ec31 commit aef2787
Showing 1 changed file with 10 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@
*/

import React, { useCallback, useState } from 'react';
import {
EuiFlexGroup,
EuiFlexItem,
EuiButton,
EuiButtonEmpty,
EuiToolTip,
} from '@elastic/eui';
import { EuiFlexGroup, EuiFlexItem, EuiButton, EuiButtonEmpty, EuiToolTip } from '@elastic/eui';
import { FormattedMessage } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';
import { useDebounce } from 'react-use';
Expand Down Expand Up @@ -142,11 +136,15 @@ function DefaultEditorControls({
onClick={() => toggleAutoApply(!autoApplyEnabled)}
size="s"
minWidth={80}
aria-label={autoApplyEnabled ? i18n.translate('visDefaultEditor.sidebar.autoApplyChangesLabelOn', {
defaultMessage: 'Auto apply is on',
}) : autoApplyEnabled ? i18n.translate('visDefaultEditor.sidebar.autoApplyChangesLabelOff', {
defaultMessage: 'Auto apply is off',
})}
aria-label={
autoApplyEnabled
? i18n.translate('visDefaultEditor.sidebar.autoApplyChangesLabelOn', {
defaultMessage: 'Auto apply is on',
})
: i18n.translate('visDefaultEditor.sidebar.autoApplyChangesLabelOff', {
defaultMessage: 'Auto apply is off',
})
}
>
{autoApplyEnabled
? i18n.translate('visDefaultEditor.sidebar.autoApplyChangesOn', {
Expand Down

0 comments on commit aef2787

Please sign in to comment.