Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve UI #539

Merged
merged 4 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/apps/src/app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ body {
}
}

.page-bg {
background: linear-gradient(180deg, #02061f 0%, #1c1837 100%);
@layer utilities {
.page-bg {
background: linear-gradient(180deg, #02061f 0%, #1c1837 100%);
}
}

.loading-bar {
Expand Down
4 changes: 2 additions & 2 deletions packages/apps/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export const metadata: Metadata = {

export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en" className="page-bg text-white">
<body className={ibm_plex_sans.className}>
<html lang="en" style={{ backgroundColor: "#000421" }}>
<body className={`${ibm_plex_sans.className} page-bg text-white`}>
<GraphqlProvider>
<RainbowProvider>
<AppProvider>
Expand Down
36 changes: 21 additions & 15 deletions packages/apps/src/components/bridge-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,32 @@ export default function BridgeSelect({ options, value, onChange = () => undefine
return (
<ISelect
labelClassName="bg-app-bg p-middle flex items-center justify-between border-transparent"
childClassName="bg-component border-line py-small flex flex-col rounded border"
childClassName="bg-app-bg border-primary/50 py-small flex flex-col rounded border"
label={active ? <span className="text-sm font-normal text-white">{active.getName()}</span> : undefined}
placeholder={<span className="text-sm font-normal text-white/50">Select a bridge</span>}
sameWidth
onClear={() => onChange(undefined)}
>
{options.map((c) => {
const b = bridgeFactory({ category: c });
return (
<button
key={c}
onClick={() => {
onChange(c);
}}
className="px-middle py-small text-start text-sm font-light text-white transition-colors hover:bg-white/10"
>
{b?.getName() || "-"}
</button>
);
})}
{options.length ? (
options.map((c) => {
const b = bridgeFactory({ category: c });
return (
<button
key={c}
onClick={() => {
onChange(c);
}}
className="px-middle py-small text-start text-sm font-light text-white transition-colors hover:bg-white/10"
>
{b?.getName() || "-"}
</button>
);
})
) : (
<div className="px-middle py-small">
<span className="text-sm text-white/50">No data</span>
</div>
)}
</ISelect>
);
}
2 changes: 1 addition & 1 deletion packages/apps/src/components/chain-token-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function ChainTokenSelect({ options, value, width, placement, onC
return (
<ISelect
labelClassName="p-middle bg-app-bg flex shrink-0 items-center justify-between border-transparent"
childClassName="bg-component rounded border border-white/10 shadow-2xl"
childClassName="bg-app-bg rounded border border-primary/50 shadow-2xl"
label={
value ? (
<div className="gap-middle lg:gap-large flex items-center">
Expand Down
17 changes: 13 additions & 4 deletions packages/apps/src/components/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ export default function Header() {
target="_blank"
href={href}
key={label}
className="rounded-lg px-3 py-1 text-base font-medium transition hover:bg-white/10 active:translate-y-1"
className={`rounded-lg px-3 py-1 text-base font-medium transition hover:bg-white/10 active:translate-y-1 ${
pathname === href ? "text-primary underline" : ""
}`}
>
{label}
</a>
Expand All @@ -85,7 +87,9 @@ export default function Header() {
<Link
key={label}
href={href}
className="rounded-lg px-3 py-1 text-base font-medium transition hover:bg-white/10 active:translate-y-1"
className={`rounded-lg px-3 py-1 text-base font-medium transition-all hover:bg-white/10 active:translate-y-1 ${
pathname === href ? "text-primary underline underline-offset-8" : ""
}`}
>
{label}
</Link>
Expand Down Expand Up @@ -121,7 +125,7 @@ export default function Header() {
target="_blank"
href={href}
key={label}
className="font-semibold hover:underline"
className={`font-semibold ${pathname === href ? "text-primary underline underline-offset-4" : ""}`}
>
{label}
</a>
Expand All @@ -130,7 +134,12 @@ export default function Header() {
<span className="font-semibold text-white/50">{label}</span>
</Tooltip>
) : (
<Link key={label} href={href} className="font-semibold hover:underline" onClick={setDrawerClose}>
<Link
key={label}
href={href}
className={`font-semibold ${pathname === href ? "text-primary underline underline-offset-4" : ""}`}
onClick={setDrawerClose}
>
{label}
</Link>
),
Expand Down