Skip to content

Commit 8f7cae3

Browse files
authored
Merge pull request #115 from BootNodeDev/fix/ui
2 parents 8b8c47d + 2f97fad commit 8f7cae3

File tree

10 files changed

+30
-20
lines changed

10 files changed

+30
-20
lines changed

typescript/ui/src/components/buttons/SolidButton.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { PropsWithChildren, ReactElement } from 'react';
22

33
interface ButtonProps {
44
type?: 'submit' | 'reset' | 'button';
5-
color?: 'white' | 'primary' | 'accent' | 'green' | 'red' | 'gray'; // defaults to primary
5+
color?: 'white' | 'primary' | 'accent' | 'green' | 'red' | 'gray' | 'secondary'; // defaults to primary
66
bold?: boolean;
77
className?: string;
88
icon?: ReactElement;
@@ -45,6 +45,9 @@ export function SolidButton(
4545
} else if (color === 'gray') {
4646
baseColors = 'bg-gray-100 text-primary-500';
4747
onHover = 'hover:bg-gray-200';
48+
} else if (color === 'secondary') {
49+
baseColors = 'bg-secondary-100 text-black border border-secondary-200';
50+
onHover = 'hover:bg-secondary-300';
4851
}
4952
const onDisabled = 'disabled:bg-gray-300 disabled:text-gray-500';
5053
const weight = bold ? 'font-semibold' : '';

typescript/ui/src/components/input/TextField.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ export const TextInput = forwardRef(function _TextInput(
3030
});
3131

3232
const defaultClassName =
33-
'mt-1.5 px-2.5 py-2.5 text-sm rounded-lg border border-primary-300 focus:border-primary-500 disabled:bg-gray-150 outline-none transition-all duration-300';
33+
'mt-1.5 px-2.5 py-2.5 text-sm rounded-lg border border-primary-300 focus:border-primary-1000 disabled:bg-gray-150 outline-none transition-all duration-300';

typescript/ui/src/components/layout/Card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ interface Props {
77
export function Card({ className, children }: PropsWithChildren<Props>) {
88
return (
99
<div
10-
className={`relative overflow-auto rounded-2xl bg-white p-1.5 xs:p-2 sm:p-3 md:p-4 ${className}`}
10+
className={`max-w-95vw relative overflow-auto rounded-2xl bg-white p-1.5 xs:p-2 sm:p-3 md:p-4 ${className}`}
1111
>
1212
{children}
1313
</div>

typescript/ui/src/components/nav/Header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import Title from '../../images/logos/app-title.svg';
88
export function Header() {
99
return (
1010
<header className="w-full px-2 pb-2 pt-3 sm:px-6 lg:px-12">
11-
<div className="flex items-start justify-between">
11+
<div className="flex items-center justify-between">
1212
<Link href="/" className="flex items-center py-2">
1313
<Image src={Logo} height={40} alt="" />
1414
<Image src={Name} height={30} alt="" className="ml-2 mt-0.5 hidden sm:block" />

typescript/ui/src/features/chains/ChainSelectField.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ export function ChainSelectField({ name, label, onChange, disabled, customListIt
4343
className={`${styles.base} ${disabled ? styles.disabled : styles.enabled}`}
4444
onClick={onClick}
4545
>
46-
<div className="flex items-center gap-3">
47-
<div className="max-w-[1.4rem] sm:max-w-fit">
46+
<div className="flex items-center gap-2 sm:gap-3">
47+
<div className="max-w-[1.4rem] flex-shrink-0 sm:max-w-fit">
4848
<ChainLogo chainName={field.value} size={32} />
4949
</div>
50-
<div className="flex flex-col items-start gap-1">
50+
<div className="flex flex-col items-start gap-1 whitespace-nowrap">
5151
<label htmlFor={name} className="text-xs text-gray-600">
5252
{label}
5353
</label>
@@ -68,6 +68,6 @@ export function ChainSelectField({ name, label, onChange, disabled, customListIt
6868

6969
const styles = {
7070
base: 'px-2 py-1.5 w-full flex items-center justify-between text-sm bg-white rounded-lg border border-primary-300 outline-none transition-colors duration-500',
71-
enabled: 'hover:bg-gray-100 active:scale-95 focus:border-primary-500',
71+
enabled: 'hover:bg-gray-100 active:scale-95 focus:border-primary-1000',
7272
disabled: 'bg-gray-150 cursor-default',
7373
};

typescript/ui/src/features/tokens/TokenSelectField.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,6 @@ function TokenButton({
104104

105105
const styles = {
106106
base: 'mt-1.5 w-full px-2.5 py-2.5 flex items-center justify-between text-sm rounded-lg border border-primary-300 outline-none transition-colors duration-500',
107-
enabled: 'hover:bg-gray-100 active:scale-95 focus:border-primary-500',
107+
enabled: 'hover:bg-gray-100 active:scale-95 focus:border-primary-1000',
108108
disabled: 'bg-gray-100 cursor-default',
109109
};

typescript/ui/src/features/transfer/TransferTokenForm.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,9 @@ function MaxButton({ balance, disabled }: { balance?: TokenAmount; disabled?: bo
338338
<SolidButton
339339
type="button"
340340
onClick={onClick}
341-
color="primary"
341+
color="secondary"
342342
disabled={disabled}
343-
className="absolute bottom-1 right-1 top-2.5 px-2 text-xs opacity-90 all:rounded"
343+
className="text-xs absolute right-1 top-2.5 bottom-1 px-2 all:rounded"
344344
>
345345
{isLoading ? (
346346
<div className="flex items-center">
@@ -368,9 +368,9 @@ function SelfButton({ disabled }: { disabled?: boolean }) {
368368
<SolidButton
369369
type="button"
370370
onClick={onClick}
371-
color="primary"
371+
color="secondary"
372372
disabled={disabled}
373-
className="absolute bottom-1 right-1 top-2.5 px-2 text-xs opacity-90 all:rounded"
373+
className="text-xs absolute right-1 top-2.5 bottom-1 px-2 all:rounded"
374374
>
375375
Self
376376
</SolidButton>

typescript/ui/src/features/wallet/SideBarMenu.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export function SideBarMenu({
7474
</button>
7575
)}
7676
<div className="flex h-full w-full flex-col overflow-y-auto">
77-
<div className="w-full rounded-t-md bg-primary-500 px-3.5 py-2 text-base font-normal tracking-wider text-white">
77+
<div className="w-full rounded-t-md bg-accent-500 px-3.5 py-2 text-base font-normal tracking-wider text-white">
7878
Connected Wallets
7979
</div>
8080
<AccountList
@@ -83,7 +83,7 @@ export function SideBarMenu({
8383
onCopySuccess={onCopySuccess}
8484
className="px-3 py-3"
8585
/>
86-
<div className="mb-4 w-full bg-primary-500 px-3.5 py-2 text-base font-normal tracking-wider text-white">
86+
<div className="mb-4 w-full bg-accent-500 px-3.5 py-2 text-base font-normal tracking-wider text-white">
8787
Transfer History
8888
</div>
8989
<div className="flex grow flex-col px-3.5">

typescript/ui/src/features/wallet/WalletFloatingButtons.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ export function WalletFloatingButtons() {
99
}));
1010

1111
return (
12-
<div className="absolute -right-8 top-2 hidden flex-col items-center justify-end gap-4 sm:flex">
12+
<div className="absolute -top-8 right-0 flex-col items-center justify-end gap-4 sm:-right-8 sm:top-2 sm:flex">
1313
<IconButton
14-
classes={`p-0.5 ${styles.roundedCircle} `}
14+
className={`p-0.5 ${styles.roundedCircle} `}
1515
title="History"
1616
onClick={() => setIsSideBarOpen(!isSideBarOpen)}
1717
>

typescript/ui/tailwind.config.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,28 @@ module.exports = {
2424
50: '#E6EDF9',
2525
100: '#CDDCF4',
2626
200: '#A7C2EC',
27-
300: '#82A8E4',
27+
300: '#e6e6e6',
2828
400: '#5385D2',
2929
500: '#2764c1',
3030
600: '#1D4685',
3131
700: '#162A4A',
3232
800: '#11213B',
3333
900: '#0D192C',
34+
1000: '#959595'
35+
},
36+
secondary: {
37+
100: '#fff1e5',
38+
200: '#f7a35f',
39+
300: '#ffe8d4',
3440
},
3541
accent: {
3642
50: '#FAEAF8',
3743
100: '#F2C1EA',
3844
200: '#EA98DC',
3945
300: '#E26ECE',
4046
400: '#DA45C0',
41-
500: '#fb8e56',
42-
600: '#fc6e4f',
47+
500: '#f7a35f',
48+
600: '#e8995a',
4349
700: '#fb5247',
4450
800: '#6B185C',
4551
900: '#400E37',
@@ -101,6 +107,7 @@ module.exports = {
101107
},
102108
maxWidth: {
103109
'xl-1': '39.5rem',
110+
'95vw': '95vw',
104111
},
105112
},
106113
},

0 commit comments

Comments
 (0)