Skip to content

Commit 48611ca

Browse files
authored
codemod(flex): apply changes for @getsentry/dashboards (#106292)
Applies the flex codemod to files owned by @getsentry/dashboards.
1 parent 90f847e commit 48611ca

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

static/app/components/modals/widgetViewerModal.tsx

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ import isEqual from 'lodash/isEqual';
99
import trimStart from 'lodash/trimStart';
1010
import moment from 'moment-timezone';
1111

12+
import {Flex, Stack} from '@sentry/scraps/layout';
13+
1214
import {fetchTotalCount} from 'sentry/actionCreators/events';
1315
import type {ModalRenderProps} from 'sentry/actionCreators/modal';
1416
import type {Client} from 'sentry/api';
@@ -796,10 +798,10 @@ function WidgetViewerModal(props: Props) {
796798
forceTransactions={metricsDataSide.forceTransactionsOnly}
797799
>
798800
<Header closeButton>
799-
<WidgetHeader>
800-
<WidgetTitleRow>
801+
<Stack gap="md">
802+
<Flex align="center" gap="sm">
801803
<h3>{widget.title}</h3>
802-
</WidgetTitleRow>
804+
</Flex>
803805
{widget.description && (
804806
<Tooltip
805807
title={widget.description}
@@ -811,7 +813,7 @@ function WidgetViewerModal(props: Props) {
811813
<WidgetDescription>{widget.description}</WidgetDescription>
812814
</Tooltip>
813815
)}
814-
</WidgetHeader>
816+
</Stack>
815817
</Header>
816818
<Body>{renderWidgetViewer()}</Body>
817819
<Footer>
@@ -1264,16 +1266,4 @@ const EmptyQueryContainer = styled('span')`
12641266
color: ${p => p.theme.tokens.content.disabled};
12651267
`;
12661268

1267-
const WidgetHeader = styled('div')`
1268-
display: flex;
1269-
flex-direction: column;
1270-
gap: ${p => p.theme.space.md};
1271-
`;
1272-
1273-
const WidgetTitleRow = styled('div')`
1274-
display: flex;
1275-
align-items: center;
1276-
gap: ${p => p.theme.space.sm};
1277-
`;
1278-
12791269
export default withPageFilters(WidgetViewerModal);

0 commit comments

Comments
 (0)