Skip to content

Commit

Permalink
Add category to buttons and put in scroll box
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisWhisker committed Apr 23, 2024
1 parent 283f2de commit ca6c413
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
17 changes: 14 additions & 3 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ export default function Home() {
{/* Title and description */}
<h1 className="text-6xl title">Elden scribE</h1>
<h2 className="text-2xl body">Easily create messages for Elden Ring</h2>
{/* Add spacer that fills extra vertical space between these */}
<br></br>
<br></br>
<br></br>
<br></br>
{/* Container for search text and input box */}
<div className="z-10 w-full max-w-5xl items-center font-mono text-sm lg:flex">
<div className="mr-4">Search:</div>
Expand All @@ -38,9 +43,15 @@ export default function Home() {
onChange={handleInputChange} // Call handleInputChange function when text changes
/>
</div>
<div id="buttonContainer">
{/* Buttons will be dynamically added here */}
</div>
<br></br>
{/* Container for buttons */}
<div className="w-full max-w-5xl" style={{ maxHeight: "400px", overflowY: "auto" }}>
{/* Container for buttons with vertical scroll */}
<div id="buttonContainer" className="flex justify-between">
{/* Buttons will be dynamically added here */}
</div>
</div>
</main>
);

}
3 changes: 2 additions & 1 deletion app/search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ const Button: React.FC<ButtonProps> = ({ onClick, title, textContent }) => {
borderRadius: "9999px" // Make the button pill-shaped
}}
>
{textContent}
{textContent}<br/>
<span style={{ fontSize: "12px", padding: "0px 0px", margin: "0px" }}>{title}</span> {/* Add smaller text for category */}
</button>
);
};
Expand Down

0 comments on commit ca6c413

Please sign in to comment.