From 0df681476f642c7c7c9daaec3854a81accb914d7 Mon Sep 17 00:00:00 2001 From: Jethary Date: Fri, 16 Feb 2024 10:35:52 -0500 Subject: [PATCH] rename component --- ...DOMCoords.tsx => RobotCoordinateSpaceWithRef.tsx} | 12 +++++------- .../src/hardware-sim/RobotCoordinateSpace/index.ts | 2 +- protocol-designer/src/components/DeckSetup/index.tsx | 6 +++--- 3 files changed, 9 insertions(+), 11 deletions(-) rename components/src/hardware-sim/RobotCoordinateSpace/{RobotCoordinateSpaceWithDOMCoords.tsx => RobotCoordinateSpaceWithRef.tsx} (78%) diff --git a/components/src/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpaceWithDOMCoords.tsx b/components/src/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpaceWithRef.tsx similarity index 78% rename from components/src/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpaceWithDOMCoords.tsx rename to components/src/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpaceWithRef.tsx index 5daece60d7f..c1986711ed2 100644 --- a/components/src/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpaceWithDOMCoords.tsx +++ b/components/src/hardware-sim/RobotCoordinateSpace/RobotCoordinateSpaceWithRef.tsx @@ -2,21 +2,19 @@ import * as React from 'react' import { Svg } from '../../primitives' import type { DeckDefinition, DeckSlot } from '@opentrons/shared-data' -export interface RobotCoordinateSpaceWithDOMCoordsRenderProps { +export interface RobotCoordinateSpaceWithRefRenderProps { deckSlotsById: { [slotId: string]: DeckSlot } } -interface RobotCoordinateSpaceWithDOMCoordsProps +interface RobotCoordinateSpaceWithRefProps extends React.ComponentProps { viewBox?: string | null deckDef?: DeckDefinition - children?: ( - props: RobotCoordinateSpaceWithDOMCoordsRenderProps - ) => React.ReactNode + children?: (props: RobotCoordinateSpaceWithRefRenderProps) => React.ReactNode } -export function RobotCoordinateSpaceWithDOMCoords( - props: RobotCoordinateSpaceWithDOMCoordsProps +export function RobotCoordinateSpaceWithRef( + props: RobotCoordinateSpaceWithRefProps ): JSX.Element | null { const { children, deckDef, viewBox, ...restProps } = props const wrapperRef = React.useRef(null) diff --git a/components/src/hardware-sim/RobotCoordinateSpace/index.ts b/components/src/hardware-sim/RobotCoordinateSpace/index.ts index 71c518dc39a..07fadd1099a 100644 --- a/components/src/hardware-sim/RobotCoordinateSpace/index.ts +++ b/components/src/hardware-sim/RobotCoordinateSpace/index.ts @@ -1,2 +1,2 @@ -export * from './RobotCoordinateSpaceWithDOMCoords' +export * from './RobotCoordinateSpaceWithRef' export * from './RobotCoordinateSpace' diff --git a/protocol-designer/src/components/DeckSetup/index.tsx b/protocol-designer/src/components/DeckSetup/index.tsx index 8ee1ebc1bf4..dcf7fce2855 100644 --- a/protocol-designer/src/components/DeckSetup/index.tsx +++ b/protocol-designer/src/components/DeckSetup/index.tsx @@ -7,7 +7,7 @@ import { DeckFromLayers, FlexTrash, Module, - RobotCoordinateSpaceWithDOMCoords, + RobotCoordinateSpaceWithRef, SingleSlotFixture, StagingAreaFixture, StagingAreaLocation, @@ -553,7 +553,7 @@ export const DeckSetup = (): JSX.Element => { {drilledDown && }
- { /> )} - +
)