From 9f7e519407e353a1cd0835ce0a44d089923aafbf Mon Sep 17 00:00:00 2001 From: gtarpenning Date: Thu, 10 Oct 2024 15:25:24 -0700 Subject: [PATCH] move --- .../EvaluationDefinition.tsx | 20 +------------------ .../ComparisonDefinitionSection/dragUtils.tsx | 17 ++++++++++++++++ 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/CompareEvaluationsPage/sections/ComparisonDefinitionSection/EvaluationDefinition.tsx b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/CompareEvaluationsPage/sections/ComparisonDefinitionSection/EvaluationDefinition.tsx index f7318819de5..57ba15b3b57 100644 --- a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/CompareEvaluationsPage/sections/ComparisonDefinitionSection/EvaluationDefinition.tsx +++ b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/CompareEvaluationsPage/sections/ComparisonDefinitionSection/EvaluationDefinition.tsx @@ -1,6 +1,5 @@ import {Box} from '@material-ui/core'; import {Circle} from '@mui/icons-material'; -import {WBIcon} from '@wandb/ui'; import {PopupDropdown} from '@wandb/weave/common/components/PopupDropdown'; import { DragDropState, @@ -10,7 +9,6 @@ import {DragHandle} from '@wandb/weave/common/containers/DragDropContainer/DragH import {Button} from '@wandb/weave/components/Button'; import {Pill} from '@wandb/weave/components/Tag'; import React, {useMemo} from 'react'; -import styled from 'styled-components'; import { MOON_300, @@ -33,6 +31,7 @@ import { } from '../../ecpConstants'; import {EvaluationComparisonState, getBaselineCallId} from '../../ecpState'; import {HorizontalBox} from '../../Layout'; +import {DragHandleIcon} from './dragUtils'; export const EvaluationDefinition: React.FC<{ state: EvaluationComparisonState; @@ -120,7 +119,6 @@ export const EvaluationDefinition: React.FC<{ icon="overflow-horizontal" size="small" variant="ghost" - // style={{marginLeft: '4px'}} /> } /> @@ -249,19 +247,3 @@ export const VerticalBar: React.FC = () => { /> ); }; - -const DragHandleIcon = styled(WBIcon).attrs({name: 'vertical-handle'})` - font-size: 26px; - border-radius: 50%; - color: gray300; - user-select: none; - cursor: grab; - &&&:hover { - background: gray100; - color: black; - } - &:active { - cursor: grabbing; - } -`; -DragHandle.displayName = 'S.DragHandle'; diff --git a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/CompareEvaluationsPage/sections/ComparisonDefinitionSection/dragUtils.tsx b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/CompareEvaluationsPage/sections/ComparisonDefinitionSection/dragUtils.tsx index df2f9355a8a..524bdbb640b 100644 --- a/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/CompareEvaluationsPage/sections/ComparisonDefinitionSection/dragUtils.tsx +++ b/weave-js/src/components/PagePanelComponents/Home/Browse3/pages/CompareEvaluationsPage/sections/ComparisonDefinitionSection/dragUtils.tsx @@ -1,5 +1,6 @@ /***** COPIED FROM app/src/util/dragDrop.tsx *****/ +import {WBIcon} from '@wandb/ui'; import { DragDropState, DragSourceProps, @@ -291,3 +292,19 @@ const DropIndicatorLine = styled.div<{ } }} `; + +export const DragHandleIcon = styled(WBIcon).attrs({name: 'vertical-handle'})` + font-size: 26px; + border-radius: 50%; + color: gray300; + user-select: none; + cursor: grab; + &&&:hover { + background: gray100; + color: black; + } + &:active { + cursor: grabbing; + } +`; +DragHandleIcon.displayName = 'S.DragHandle';