From 5a0695ce1f1f0c82cb19d38cf4a1e89820527fca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josh=20Goldberg=20=E2=9C=A8?= Date: Wed, 18 Mar 2026 09:51:08 -0400 Subject: [PATCH] ref(components): extracted a DragReorderButton component --- .../app/components/dnd/dragReorderButton.tsx | 28 +++++++++++++++++++ .../rules/uptime/assertions/opCommon.tsx | 9 ++---- .../rules/uptime/assertions/opGroup.tsx | 8 ++---- .../buildSteps/groupByStep/queryField.tsx | 20 ++++--------- .../common/sortableFieldWrapper.tsx | 17 ++--------- .../visualize/visualizeGhostField.tsx | 12 +++----- .../discover/table/columnEditCollection.tsx | 11 +++----- .../toolbar/toolbarGroupBy/index.tsx | 12 ++------ .../toolbar/toolbarVisualize/index.tsx | 10 ++----- .../toolbarVisualize/visualizeEquation.tsx | 10 ++----- .../tables/aggregateColumnEditorModal.tsx | 15 +++++----- .../explore/tables/columnEditorModal.tsx | 15 +++++----- 12 files changed, 71 insertions(+), 96 deletions(-) create mode 100644 static/app/components/dnd/dragReorderButton.tsx diff --git a/static/app/components/dnd/dragReorderButton.tsx b/static/app/components/dnd/dragReorderButton.tsx new file mode 100644 index 00000000000000..00e6b800816123 --- /dev/null +++ b/static/app/components/dnd/dragReorderButton.tsx @@ -0,0 +1,28 @@ +import {Button, type ButtonProps} from '@sentry/scraps/button'; + +import {IconGrabbable} from 'sentry/icons'; +import {t} from 'sentry/locale'; +import type {IconSize} from 'sentry/utils/theme'; + +type DragReorderButtonProps = Omit & { + iconSize?: IconSize; +}; + +export function DragReorderButton({ + size = 'zero', + iconSize = 'xs', + ref, + ...props +}: DragReorderButtonProps) { + return ( +