Skip to content

Commit 737205e

Browse files
authored
feat(site): add numbers to SSHButton content for clarity (coder#15661)
1 parent 06e7739 commit 737205e

File tree

1 file changed

+25
-21
lines changed

1 file changed

+25
-21
lines changed

site/src/modules/resources/SSHButton/SSHButton.tsx

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -48,28 +48,18 @@ export const SSHButton: FC<SSHButtonProps> = ({
4848
Run the following commands to connect with SSH:
4949
</HelpTooltipText>
5050

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}`}
7060
/>
71-
</div>
72-
</Stack>
61+
</Stack>
62+
</ol>
7363

7464
<HelpTooltipLinksGroup>
7565
<HelpTooltipLink href={docs("/install")}>
@@ -92,6 +82,20 @@ export const SSHButton: FC<SSHButtonProps> = ({
9282
);
9383
};
9484

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+
9599
const classNames = {
96100
paper: (css, theme) => css`
97101
padding: 16px 24px 24px;

0 commit comments

Comments
 (0)