Skip to content

Commit f0b9c1f

Browse files
committed
UI Changes: span so that words in navbar is hidden if width is too small (for phones)
1 parent ae8959e commit f0b9c1f

2 files changed

Lines changed: 29 additions & 6 deletions

File tree

client/src/components/ui/input.tsx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import * as React from "react";
2+
3+
import { cn } from "@/lib/utils";
4+
5+
const Input = React.forwardRef<HTMLInputElement, React.ComponentProps<"input">>(
6+
({ className, type, ...props }, ref) => {
7+
return (
8+
<input
9+
type={type}
10+
className={cn(
11+
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
12+
className,
13+
)}
14+
ref={ref}
15+
{...props}
16+
/>
17+
);
18+
},
19+
);
20+
Input.displayName = "Input";
21+
22+
export { Input };

client/src/pages/index.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,47 +20,48 @@ export default function AboutPage() {
2020
className="flex items-center gap-2 text-gray-300 hover:text-white"
2121
>
2222
<Home className="h-4 w-4" />
23-
Welcome
23+
<span className="hidden sm:inline">Welcome</span>
2424
</button>
2525

2626
<button
2727
onClick={() => scrollTo("about")}
2828
className="flex items-center gap-2 text-gray-300 hover:text-white"
2929
>
3030
<Info className="h-4 w-4" />
31-
About
31+
<span className="hidden sm:inline">About</span>
3232
</button>
3333

3434
<button
3535
onClick={() => scrollTo("how")}
3636
className="flex items-center gap-2 text-gray-300 hover:text-white"
3737
>
3838
<Workflow className="h-4 w-4" />
39-
How It Works
39+
<span className="hidden sm:inline">How</span>
4040
</button>
4141

4242
<button
4343
onClick={() => scrollTo("why")}
4444
className="flex items-center gap-2 text-gray-300 hover:text-white"
4545
>
4646
<Star className="h-4 w-4" />
47-
Why Us
47+
48+
<span className="hidden sm:inline">Why</span>
4849
</button>
4950

5051
<button
5152
onClick={() => scrollTo("login")}
5253
className="flex items-center gap-2 text-gray-300 hover:text-white"
5354
>
5455
<LogIn className="h-4 w-4" />
55-
Get Started
56+
<span className="hidden sm:inline">Start</span>
5657
</button>
5758

5859
<button
5960
onClick={() => scrollTo("contact")}
6061
className="flex items-center gap-2 text-gray-300 hover:text-white"
6162
>
6263
<Mail className="h-4 w-4" />
63-
Contact
64+
<span className="hidden sm:inline">Contact</span>
6465
</button>
6566
</div>
6667
</nav>

0 commit comments

Comments
 (0)