Skip to content

Commit

Permalink
removing tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
cauemarcondes committed Jan 20, 2021
1 parent a647bf3 commit b3fd41f
Showing 1 changed file with 31 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/
import { EuiCheckbox, EuiSelect, EuiToolTip } from '@elastic/eui';
import { EuiCheckbox, EuiSelect } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import moment from 'moment';
import React from 'react';
Expand Down Expand Up @@ -108,46 +108,36 @@ export function TimeComparison() {
}

return (
<EuiToolTip
content={
selectOptions.length === 0 &&
i18n.translate('xpack.apm.timeComparison.tooltipLabel', {
defaultMessage:
'Week-over-week comparison is not available for ranges longer than 7 days.',
})
<EuiSelect
data-test-subj="comparisonSelect"
disabled={selectOptions.length <= 1}
options={selectOptions}
value={comparisonType}
prepend={
<PrependContainer>
<EuiCheckbox
id="comparison"
label={i18n.translate('xpack.apm.timeComparison.label', {
defaultMessage: 'Comparison',
})}
checked={comparisonEnabled && selectOptions.length > 0}
onChange={() => {
urlHelpers.push(history, {
query: {
comparisonEnabled: Boolean(!comparisonEnabled).toString(),
},
});
}}
/>
</PrependContainer>
}
>
<EuiSelect
data-test-subj="comparisonSelect"
disabled={selectOptions.length <= 1}
options={selectOptions}
value={comparisonType}
prepend={
<PrependContainer>
<EuiCheckbox
id="comparison"
label={i18n.translate('xpack.apm.timeComparison.label', {
defaultMessage: 'Comparison',
})}
checked={comparisonEnabled && selectOptions.length > 0}
onChange={() => {
urlHelpers.push(history, {
query: {
comparisonEnabled: Boolean(!comparisonEnabled).toString(),
},
});
}}
/>
</PrependContainer>
}
onChange={(e) => {
urlHelpers.push(history, {
query: {
comparisonType: e.target.value,
},
});
}}
/>
</EuiToolTip>
onChange={(e) => {
urlHelpers.push(history, {
query: {
comparisonType: e.target.value,
},
});
}}
/>
);
}

0 comments on commit b3fd41f

Please sign in to comment.