@@ -2,23 +2,25 @@ import * as React from 'react'
2
2
3
3
import { useTranslation } from 'react-i18next'
4
4
5
- import { Flex , DISPLAY_INLINE , LegacyStyledText } from '@opentrons/components'
5
+ import { Flex , DISPLAY_INLINE , StyledText } from '@opentrons/components'
6
6
7
7
import { CommandText } from '../../../molecules/Command'
8
8
9
9
import type { StyleProps } from '@opentrons/components'
10
10
import type { RecoveryContentProps } from '../types'
11
11
12
12
interface StepInfoProps extends StyleProps {
13
- textStyle : React . ComponentProps < typeof LegacyStyledText > [ 'as' ]
14
13
stepCounts : RecoveryContentProps [ 'stepCounts' ]
15
14
failedCommand : RecoveryContentProps [ 'failedCommand' ]
16
15
robotType : RecoveryContentProps [ 'robotType' ]
17
16
protocolAnalysis : RecoveryContentProps [ 'protocolAnalysis' ]
17
+ desktopStyle ?: React . ComponentProps < typeof StyledText > [ 'desktopStyle' ]
18
+ oddStyle ?: React . ComponentProps < typeof StyledText > [ 'oddStyle' ]
18
19
}
19
20
20
21
export function StepInfo ( {
21
- textStyle,
22
+ desktopStyle,
23
+ oddStyle,
22
24
stepCounts,
23
25
failedCommand,
24
26
robotType,
@@ -35,18 +37,27 @@ export function StepInfo({
35
37
const currentCopy = currentStepNumber ?? '?'
36
38
const totalCopy = totalStepCount ?? '?'
37
39
40
+ const desktopStyleDefaulted = desktopStyle ?? 'bodyDefaultRegular'
41
+ const oddStyleDefaulted = oddStyle ?? 'bodyTextRegular'
42
+
38
43
return (
39
44
< Flex display = { DISPLAY_INLINE } { ...styleProps } >
40
- < LegacyStyledText as = { textStyle } display = { DISPLAY_INLINE } >
45
+ < StyledText
46
+ desktopStyle = { desktopStyleDefaulted }
47
+ oddStyle = { oddStyleDefaulted }
48
+ display = { DISPLAY_INLINE }
49
+ >
41
50
{ `${ t ( 'at_step' ) } ${ currentCopy } /${ totalCopy } : ` }
42
- </ LegacyStyledText >
51
+ </ StyledText >
43
52
{ analysisCommand != null && protocolAnalysis != null ? (
44
53
< CommandText
45
54
command = { analysisCommand }
46
55
commandTextData = { protocolAnalysis }
47
56
robotType = { robotType }
48
57
display = { DISPLAY_INLINE }
49
- as = { textStyle }
58
+ modernStyledTextDefaults = { true }
59
+ desktopStyle = { desktopStyleDefaulted }
60
+ oddStyle = { oddStyleDefaulted }
50
61
/>
51
62
) : null }
52
63
</ Flex >
0 commit comments