Skip to content

Commit

Permalink
fix(app): fix pause icon alignment in ODD command icon (#14319)
Browse files Browse the repository at this point in the history
* fix(app): fix pause icon alignment in ODD command icon

closes RQA-2030
  • Loading branch information
ncdiehl11 authored Jan 24, 2024
1 parent 46195f5 commit 81ca902
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,9 @@ export function RunningProtocolCommandList({
lineHeight="1.75rem"
fontWeight={TYPOGRAPHY.fontWeightRegular}
borderRadius={BORDERS.borderRadiusSize2}
gridGap="0.875rem"
>
<CommandIcon command={command} />
<CommandIcon command={command} size="2rem" />
<CommandText
command={command}
robotSideAnalysis={robotSideAnalysis}
Expand Down
12 changes: 4 additions & 8 deletions app/src/organisms/RunPreview/CommandIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react'
import { SPACING, Icon, IconName } from '@opentrons/components'
import { Icon, IconName } from '@opentrons/components'
import { RunTimeCommand } from '@opentrons/shared-data'
import type { StyleProps } from '@opentrons/components'

Expand All @@ -11,9 +11,10 @@ const ICON_BY_COMMAND_TYPE: { [commandType: string]: IconName } = {
}
interface CommandIconProps extends StyleProps {
command: RunTimeCommand
size?: string | number
}
export function CommandIcon(props: CommandIconProps): JSX.Element | null {
const { command, ...styleProps } = props
const { command, size = '1rem', ...styleProps } = props
let iconName = null
if (
command.commandType === 'moveLabware' &&
Expand All @@ -30,11 +31,6 @@ export function CommandIcon(props: CommandIconProps): JSX.Element | null {
}

return iconName != null ? (
<Icon
{...styleProps}
name={iconName}
size={SPACING.spacing20}
flex="0 0 auto"
/>
<Icon {...styleProps} size={size} name={iconName} flex="0 0 auto" />
) : null
}

0 comments on commit 81ca902

Please sign in to comment.