Skip to content

Commit 92a67b9

Browse files
carletexrin-st
andauthored
UI tweaks/redesign (#1282)
Co-authored-by: Rinat <rinat@hey.com>
1 parent d651562 commit 92a67b9

21 files changed

Lines changed: 62 additions & 87 deletions

File tree

packages/nextjs/app/blockexplorer/_components/AddressComponent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const AddressComponent = ({
2121
</div>
2222
<div className="col-span-5 grid grid-cols-1 lg:grid-cols-2 gap-8 lg:gap-10">
2323
<div className="col-span-1 flex flex-col">
24-
<div className="bg-base-100 border-base-300 border shadow-md shadow-secondary rounded-3xl px-6 lg:px-8 mb-6 space-y-1 py-4 overflow-x-auto">
24+
<div className="bg-base-100 border-base-300 border px-6 lg:px-8 mb-6 space-y-1 py-4 overflow-x-auto">
2525
<div className="flex">
2626
<div className="flex flex-col gap-1">
2727
<Address address={address} format="long" onlyEnsOrAddress chain={targetNetwork} />

packages/nextjs/app/blockexplorer/_components/SearchBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const SearchBar = () => {
3535
return (
3636
<form onSubmit={handleSearch} className="flex items-center justify-end mb-5 space-x-3 mx-5">
3737
<input
38-
className="border-primary bg-base-100 text-base-content placeholder:text-base-content/50 p-2 mr-2 w-full md:w-1/2 lg:w-1/3 rounded-md shadow-md focus:outline-hidden focus:ring-2 focus:ring-accent"
38+
className="border-primary bg-base-100 text-base-content placeholder:text-base-content/50 p-2 mr-2 w-full md:w-1/2 lg:w-1/3 focus:outline-hidden focus:ring-2 focus:ring-accent"
3939
type="text"
4040
value={searchInput}
4141
placeholder="Search by hash or address"

packages/nextjs/app/blockexplorer/_components/TransactionsTable.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ export const TransactionsTable = ({ blocks, transactionReceipts }: TransactionsT
1111

1212
return (
1313
<div className="flex justify-center px-4 md:px-0">
14-
<div className="overflow-x-auto w-full shadow-2xl rounded-xl">
14+
<div className="overflow-x-auto w-full border border-base-300">
1515
{!hasTransactions ? (
1616
<div className="bg-base-100 rounded-xl p-8 text-center text-base-content/70">
1717
No transactions found on this page.
1818
</div>
1919
) : (
2020
<table className="table text-xl bg-base-100 table-zebra w-full md:table-md table-sm">
2121
<thead>
22-
<tr className="rounded-xl text-sm text-base-content">
22+
<tr className="text-sm text-base-content">
2323
<th className="bg-primary">Transaction Hash</th>
2424
<th className="bg-primary">Function Called</th>
2525
<th className="bg-primary">Block Number</th>

packages/nextjs/app/blockexplorer/transaction/_components/TransactionComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ const TransactionComp = ({ txHash }: { txHash: Hash }) => {
4545
{transaction ? (
4646
<div className="overflow-x-auto">
4747
<h2 className="text-3xl font-bold mb-4 text-center text-primary-content">Transaction Details</h2>{" "}
48-
<table className="table rounded-lg bg-base-100 w-full shadow-lg md:table-lg table-md">
48+
<table className="table bg-base-100 w-full border border-base-300 md:table-lg table-md">
4949
<tbody>
5050
<tr>
5151
<td>

packages/nextjs/app/debug/_components/DebugContracts.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export function DebugContracts() {
4545
className={`btn btn-secondary btn-sm font-light hover:border-transparent ${
4646
contractName === selectedContract
4747
? "bg-base-300 hover:bg-base-300 no-animation"
48-
: "bg-base-100 hover:bg-secondary"
48+
: "bg-base-100 hover:bg-secondary hover:text-secondary-content"
4949
}`}
5050
key={contractName}
5151
onClick={() => setSelectedContract(contractName)}

packages/nextjs/app/debug/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ const Debug: NextPage = () => {
1111
return (
1212
<>
1313
<DebugContracts />
14-
<div className="text-center mt-8 bg-secondary p-10">
14+
<div className="text-center mt-8 bg-secondary text-secondary-content p-10">
1515
<h1 className="text-4xl my-0">Debug Contracts</h1>
16-
<p className="text-neutral">
16+
<p>
1717
You can debug & interact with your deployed contracts here.
1818
<br /> Check{" "}
1919
<code className="italic bg-base-300 text-base font-bold [word-spacing:-0.5rem] px-1">

packages/nextjs/app/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ const Home: NextPage = () => {
4343

4444
<div className="grow bg-base-300 w-full mt-16 px-8 py-12">
4545
<div className="flex justify-center items-center gap-12 flex-col md:flex-row">
46-
<div className="flex flex-col bg-base-100 px-10 py-10 text-center items-center max-w-xs rounded-3xl">
47-
<BugAntIcon className="h-8 w-8 fill-secondary" />
46+
<div className="flex flex-col bg-base-100 border border-base-300 px-10 py-10 text-center items-center max-w-xs">
47+
<BugAntIcon className="h-8 w-8" />
4848
<p>
4949
Tinker with your smart contract using the{" "}
5050
<Link href="/debug" passHref className="link">
@@ -53,8 +53,8 @@ const Home: NextPage = () => {
5353
tab.
5454
</p>
5555
</div>
56-
<div className="flex flex-col bg-base-100 px-10 py-10 text-center items-center max-w-xs rounded-3xl">
57-
<MagnifyingGlassIcon className="h-8 w-8 fill-secondary" />
56+
<div className="flex flex-col bg-base-100 border border-base-300 px-10 py-10 text-center items-center max-w-xs">
57+
<MagnifyingGlassIcon className="h-8 w-8" />
5858
<p>
5959
Explore your local transactions with the{" "}
6060
<Link href="/blockexplorer" passHref className="link">

packages/nextjs/components/Header.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ export const HeaderMenuLinks = () => {
3535
{menuLinks.map(({ label, href, icon }) => {
3636
const isActive = pathname === href;
3737
return (
38-
<li key={href}>
38+
<li key={href} className="h-full">
3939
<Link
4040
href={href}
4141
passHref
4242
className={`${
43-
isActive ? "bg-secondary shadow-md" : ""
44-
} hover:bg-secondary hover:shadow-md focus:!bg-secondary active:!text-neutral py-1.5 px-3 text-sm rounded-full gap-2 grid grid-flow-col`}
43+
isActive ? "bg-base-300" : ""
44+
} hover:bg-base-300 focus:!bg-base-300 h-full px-4 text-sm gap-2 flex items-center`}
4545
>
4646
{icon}
4747
<span>{label}</span>
@@ -66,14 +66,14 @@ export const Header = () => {
6666
});
6767

6868
return (
69-
<div className="sticky lg:static top-0 navbar bg-base-100 min-h-0 shrink-0 justify-between z-20 shadow-md shadow-secondary px-0 sm:px-2">
70-
<div className="navbar-start w-auto lg:w-1/2">
69+
<div className="sticky lg:static top-0 navbar bg-base-100 min-h-16 shrink-0 justify-between z-20 border-b-2 border-base-300 p-0 sm:px-2">
70+
<div className="navbar-start w-auto lg:w-1/2 self-stretch">
7171
<details className="dropdown" ref={burgerMenuRef}>
7272
<summary className="ml-1 btn btn-ghost lg:hidden hover:bg-transparent">
7373
<Bars3Icon className="h-1/2" />
7474
</summary>
7575
<ul
76-
className="menu menu-compact dropdown-content mt-3 p-2 shadow-sm bg-base-100 rounded-box w-52"
76+
className="menu menu-compact dropdown-content mt-3 p-2 shadow-lg bg-base-100 w-52"
7777
onClick={() => {
7878
burgerMenuRef?.current?.removeAttribute("open");
7979
}}
@@ -90,7 +90,7 @@ export const Header = () => {
9090
<span className="text-xs">Ethereum dev stack</span>
9191
</div>
9292
</Link>
93-
<ul className="hidden lg:flex lg:flex-nowrap menu menu-horizontal px-1 gap-2">
93+
<ul className="hidden lg:flex lg:flex-nowrap h-full m-0 p-0 list-none">
9494
<HeaderMenuLinks />
9595
</ul>
9696
</div>

packages/nextjs/components/scaffold-eth/BlockieAvatar.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,5 @@ import { blo } from "blo";
77
export const BlockieAvatar: AvatarComponent = ({ address, ensImage, size }) => (
88
// Don't want to use nextJS Image here (and adding remote patterns for the URL)
99
// eslint-disable-next-line @next/next/no-img-element
10-
<img
11-
className="rounded-full"
12-
src={ensImage || blo(address as `0x${string}`)}
13-
width={size}
14-
height={size}
15-
alt={`${address} avatar`}
16-
/>
10+
<img src={ensImage || blo(address as `0x${string}`)} width={size} height={size} alt={`${address} avatar`} />
1711
);

packages/nextjs/components/scaffold-eth/Faucet.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export const Faucet = () => {
9292
{/* dummy input to capture event onclick on modal box */}
9393
<input className="h-0 w-0 absolute top-0 left-0" />
9494
<h3 className="text-xl font-bold mb-3">Local Faucet</h3>
95-
<label htmlFor="faucet-modal" className="btn btn-ghost btn-sm btn-circle absolute right-3 top-3">
95+
<label htmlFor="faucet-modal" className="btn btn-ghost btn-sm absolute right-3 top-3">
9696
9797
</label>
9898
<div className="space-y-3">
@@ -117,7 +117,7 @@ export const Faucet = () => {
117117
onValueChange={({ valueInEth }) => setSendValue(valueInEth)}
118118
style={{ width: "100%" }}
119119
/>
120-
<button className="h-10 btn btn-primary btn-sm px-2 rounded-full" onClick={sendETH} disabled={loading}>
120+
<button className="h-10 btn btn-primary btn-sm px-2" onClick={sendETH} disabled={loading}>
121121
{!loading ? (
122122
<BanknotesIcon className="h-6 w-6" />
123123
) : (

0 commit comments

Comments
 (0)