@@ -21,6 +21,7 @@ import {
2121 SIZE_2 ,
2222 SIZE_3 ,
2323 SPACING ,
24+ StyledText ,
2425 TYPOGRAPHY ,
2526 WRAP ,
2627} from '@opentrons/components'
@@ -131,7 +132,7 @@ function AnalysisInfo(props: AnalysisInfoProps): JSX.Element {
131132 mostRecentAnalysis,
132133 modified,
133134 } = props
134- const { t } = useTranslation ( [ 'protocol_list' , 'shared' ] )
135+ const { t, i18n } = useTranslation ( [ 'protocol_list' , 'shared' ] )
135136 const analysisStatus = getAnalysisStatus ( isAnalyzing , mostRecentAnalysis )
136137
137138 const { left : leftMountPipetteName , right : rightMountPipetteName } =
@@ -145,6 +146,8 @@ function AnalysisInfo(props: AnalysisInfoProps): JSX.Element {
145146 const requiredModuleTypes = requiredModuleModels . map ( getModuleType )
146147
147148 const robotType = mostRecentAnalysis ?. robotType ?? null
149+ const hasPeripherals =
150+ mostRecentAnalysis ?. commandPreconditions ?. isCameraUsed ?? false
148151
149152 return (
150153 < Flex
@@ -248,9 +251,12 @@ function AnalysisInfo(props: AnalysisInfoProps): JSX.Element {
248251 flexDirection = { DIRECTION_COLUMN }
249252 gridGap = { SPACING . spacing4 }
250253 >
251- < LegacyStyledText as = "h6" color = { COLORS . grey60 } >
252- { t ( 'robot' ) }
253- </ LegacyStyledText >
254+ < StyledText
255+ color = { COLORS . grey60 }
256+ desktopStyle = "bodyDefaultRegular"
257+ >
258+ { i18n . format ( 'robot' , 'capitalize' ) }
259+ </ StyledText >
254260 < LegacyStyledText as = "p" >
255261 { getRobotTypeDisplayName ( robotType ) }
256262 </ LegacyStyledText >
@@ -260,11 +266,13 @@ function AnalysisInfo(props: AnalysisInfoProps): JSX.Element {
260266 flexDirection = { DIRECTION_COLUMN }
261267 gridGap = { SPACING . spacing4 }
262268 data-testid = { `ProtocolCard_instruments_${ protocolDisplayName } ` }
263- minWidth = "10.625rem"
264269 >
265- < LegacyStyledText as = "h6" color = { COLORS . grey60 } >
266- { t ( 'shared:instruments' ) }
267- </ LegacyStyledText >
270+ < StyledText
271+ desktopStyle = "bodyDefaultRegular"
272+ color = { COLORS . grey60 }
273+ >
274+ { i18n . format ( t ( 'shared:instruments' ) , 'capitalize' ) }
275+ </ StyledText >
268276 {
269277 {
270278 missing : (
@@ -312,29 +320,59 @@ function AnalysisInfo(props: AnalysisInfoProps): JSX.Element {
312320 } [ analysisStatus ]
313321 }
314322 </ Flex >
315- < Flex
316- flex = "0 0 6rem"
317- flexDirection = { DIRECTION_COLUMN }
318- gridGap = { SPACING . spacing4 }
319- >
320- { requiredModuleTypes . length > 0 ? (
321- < >
322- < LegacyStyledText as = "h6" color = { COLORS . grey60 } >
323- { t ( 'modules' ) }
324- </ LegacyStyledText >
325- < Flex >
326- { requiredModuleTypes . map ( ( moduleType , index ) => (
327- < ModuleIcon
328- key = { index }
329- color = { COLORS . grey60 }
330- moduleType = { moduleType }
323+ < Flex gridGap = { SPACING . spacing4 } >
324+ < Flex
325+ flex = "0 0 6rem"
326+ flexDirection = { DIRECTION_COLUMN }
327+ gridGap = { SPACING . spacing4 }
328+ width = "85px"
329+ >
330+ { requiredModuleTypes . length > 0 ? (
331+ < >
332+ < StyledText
333+ desktopStyle = "bodyDefaultRegular"
334+ color = { COLORS . grey60 }
335+ >
336+ { i18n . format ( 'modules' , 'capitalize' ) }
337+ </ StyledText >
338+ < Flex flexWrap = { WRAP } >
339+ { requiredModuleTypes . map ( ( moduleType , index ) => (
340+ < ModuleIcon
341+ key = { index }
342+ color = { COLORS . grey50 }
343+ moduleType = { moduleType }
344+ height = "1rem"
345+ marginRight = { SPACING . spacing8 }
346+ />
347+ ) ) }
348+ </ Flex >
349+ </ >
350+ ) : null }
351+ </ Flex >
352+ { hasPeripherals && (
353+ < Flex
354+ flex = "0 0 6rem"
355+ flexDirection = { DIRECTION_COLUMN }
356+ gridGap = { SPACING . spacing4 }
357+ width = "85px"
358+ >
359+ < >
360+ < StyledText
361+ desktopStyle = "bodyDefaultRegular"
362+ color = { COLORS . grey60 }
363+ >
364+ { t ( 'peripherals' ) }
365+ </ StyledText >
366+ < Flex flexWrap = { WRAP } >
367+ < Icon
368+ color = { COLORS . grey50 }
369+ name = "photo-camera"
331370 height = "1rem"
332- marginRight = { SPACING . spacing8 }
333371 />
334- ) ) }
335- </ Flex >
336- </ >
337- ) : null }
372+ </ Flex >
373+ </ >
374+ </ Flex >
375+ ) }
338376 </ Flex >
339377 </ Flex >
340378 < Flex
0 commit comments