diff --git a/components/src/hooks/useSelectDeckLocation/SelectDeckLocation.stories.tsx b/components/src/hooks/useSelectDeckLocation/SelectDeckLocation.stories.tsx index e93640e3f5b..df387095f0b 100644 --- a/components/src/hooks/useSelectDeckLocation/SelectDeckLocation.stories.tsx +++ b/components/src/hooks/useSelectDeckLocation/SelectDeckLocation.stories.tsx @@ -3,9 +3,11 @@ import { DeckLocationSelect as DeckLocationSelectComponent } from './' import { FLEX_ROBOT_TYPE, getDeckDefFromRobotType, + OT2_ROBOT_TYPE, } from '@opentrons/shared-data' import type { Meta, StoryObj } from '@storybook/react' +import type { RobotType } from '@opentrons/shared-data' const meta: Meta> = { component: DeckLocationSelectComponent, @@ -13,23 +15,37 @@ const meta: Meta> = { } as Meta export default meta -type Story = StoryObj<{ disabledSlotNames: string[] }> +type Story = StoryObj<{ disabledSlotNames: string[]; robotType: RobotType }> -export const DeckLocationSelect: Story = { +export const FlexDeckLocationSelect: Story = { render: args => { return }, args: { disabledSlotNames: ['A2'], + robotType: FLEX_ROBOT_TYPE, }, } -function Wrapper(props: { disabledSlotNames: string[] }): JSX.Element { +export const OT2DeckLocationSelect: Story = { + render: args => { + return + }, + args: { + disabledSlotNames: ['2'], + robotType: OT2_ROBOT_TYPE, + }, +} + +function Wrapper(props: { + disabledSlotNames: string[] + robotType: RobotType +}): JSX.Element { const [selectedLocation, setSelectedLocation] = React.useState({ - slotName: 'A1', + slotName: props.robotType === FLEX_ROBOT_TYPE ? 'A1' : '1', }) - const deckDef = getDeckDefFromRobotType(FLEX_ROBOT_TYPE) + const deckDef = getDeckDefFromRobotType(props.robotType) return (