Skip to content

Commit aca4b49

Browse files
committed
Declare props interface and destructure props
1 parent abf9abd commit aca4b49

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,14 @@ export const SSHButton: FC<SSHButtonProps> = ({
8282
);
8383
};
8484

85-
const SSHStep = (props: { helpText: string; codeExample: string }) => (
85+
interface SSHStepProps { helpText: string; codeExample: string }
86+
87+
const SSHStep = ({ helpText, codeExample }: SSHStepProps) => (
8688
<li style={{ listStylePosition: "inside" }}>
8789
<HelpTooltipText style={{ display: "inline" }}>
88-
<strong css={styles.codeExampleLabel}>{props.helpText}</strong>
90+
<strong css={styles.codeExampleLabel}>{helpText}</strong>
8991
</HelpTooltipText>
90-
<CodeExample secret={false} code={props.codeExample} />
92+
<CodeExample secret={false} code={codeExample} />
9193
</li>
9294
);
9395

0 commit comments

Comments
 (0)