Skip to content

Commit ef2664f

Browse files
authored
chore(docs): add hero variant to TerminalCommand (#2968)
1 parent 4ae0d71 commit ef2664f

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

docs/src/components/InstallScripts.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ interface TerminalCommandProps {
99
framework?: Framework;
1010
packageManager?: PackageManager;
1111
command?: string;
12+
variant?: 'default' | 'hero';
1213
}
1314

1415
const frameworkInstallScript = (
@@ -32,13 +33,14 @@ export const TerminalCommand = ({
3233
framework,
3334
packageManager,
3435
command,
36+
variant = 'default',
3537
}: TerminalCommandProps) => {
3638
const terminalCommand = command
3739
? command
3840
: frameworkInstallScript(framework, packageManager);
3941

4042
return (
41-
<code className="install-code__container">
43+
<code className={`install-code__container ${variant}`}>
4244
<p className="install-code__content">{terminalCommand}</p>
4345
<CopyButton
4446
className="install-code__button"

docs/src/components/home/sections/HeroSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export const HeroSection = () => {
9797
</Grid>
9898
) : null}
9999

100-
<TerminalCommand command={frameworkInstallScript} />
100+
<TerminalCommand command={frameworkInstallScript} variant="hero" />
101101

102102
<Flex direction="row">
103103
<Button

docs/src/styles/docs/home.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@
8282
padding-inline-start: var(--amplify-space-small);
8383
max-width: 90vw;
8484
}
85+
& .hero {
86+
@media (min-width: $breakpoint-large) {
87+
max-width: 60vw;
88+
}
89+
@media (min-width: $breakpoint-xl) {
90+
max-width: 40vw;
91+
}
92+
}
8593

8694
.install-code__content {
8795
background-color: var(--amplify-colors-background-primary);

0 commit comments

Comments
 (0)