@@ -48,28 +48,18 @@ export const SSHButton: FC<SSHButtonProps> = ({
48
48
Run the following commands to connect with SSH:
49
49
</ HelpTooltipText >
50
50
51
- < Stack spacing = { 0.5 } css = { styles . codeExamples } >
52
- < div >
53
- < HelpTooltipText >
54
- < strong css = { styles . codeExampleLabel } >
55
- Configure SSH hosts on machine:
56
- </ strong >
57
- </ HelpTooltipText >
58
- < CodeExample secret = { false } code = "coder config-ssh" />
59
- </ div >
60
-
61
- < div >
62
- < HelpTooltipText >
63
- < strong css = { styles . codeExampleLabel } >
64
- Connect to the agent:
65
- </ strong >
66
- </ HelpTooltipText >
67
- < CodeExample
68
- secret = { false }
69
- code = { `ssh ${ sshPrefix } ${ workspaceName } .${ agentName } ` }
51
+ < ol style = { { margin : 0 , padding : 0 } } >
52
+ < Stack spacing = { 0.5 } css = { styles . codeExamples } >
53
+ < SSHStep
54
+ helpText = "Configure SSH hosts on machine:"
55
+ codeExample = "coder config-ssh"
56
+ />
57
+ < SSHStep
58
+ helpText = "Connect to the agent:"
59
+ codeExample = { `ssh ${ sshPrefix } ${ workspaceName } .${ agentName } ` }
70
60
/>
71
- </ div >
72
- </ Stack >
61
+ </ Stack >
62
+ </ ol >
73
63
74
64
< HelpTooltipLinksGroup >
75
65
< HelpTooltipLink href = { docs ( "/install" ) } >
@@ -92,6 +82,20 @@ export const SSHButton: FC<SSHButtonProps> = ({
92
82
) ;
93
83
} ;
94
84
85
+ interface SSHStepProps {
86
+ helpText : string ;
87
+ codeExample : string ;
88
+ }
89
+
90
+ const SSHStep : FC < SSHStepProps > = ( { helpText, codeExample } ) => (
91
+ < li style = { { listStylePosition : "inside" } } >
92
+ < HelpTooltipText style = { { display : "inline" } } >
93
+ < strong css = { styles . codeExampleLabel } > { helpText } </ strong >
94
+ </ HelpTooltipText >
95
+ < CodeExample secret = { false } code = { codeExample } />
96
+ </ li >
97
+ ) ;
98
+
95
99
const classNames = {
96
100
paper : ( css , theme ) => css `
97
101
padding : 16px 24px 24px ;
0 commit comments