Skip to content

Commit

Permalink
updating cases
Browse files Browse the repository at this point in the history
  • Loading branch information
brittanyjoiner15 committed Jan 27, 2020
1 parent e1d2d0f commit 52d3467
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,20 @@
*/

import { EuiBadge } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
import React from 'react';
import styled from 'styled-components';
import { px, units } from '../../../../../../style/variables';
import { i18n } from '@kbn/i18n';

const SpanBadge = styled(EuiBadge)`
display: inline-block;
margin-right: ${px(units.quarter)};
`;

interface SyncBadgeProps {
/**
* Is the request synchronous? True will show blocking, false will show async.
*/
sync?: boolean;
}

Expand All @@ -27,11 +30,16 @@ export function SyncBadge({ sync }: SyncBadgeProps) {
{i18n.translate('xpack.apm.transactionDetails.syncBadgeBlocking', {
defaultMessage: 'blocking'
})}
blocking
</SpanBadge>
);
case false:
return <SpanBadge>async</SpanBadge>;
return (
<SpanBadge>
{i18n.translate('xpack.apm.transactionDetails.syncBadgeAsync', {
defaultMessage: 'async'
})}
</SpanBadge>
);
default:
return null;
}
Expand Down

0 comments on commit 52d3467

Please sign in to comment.