Skip to content

Commit b9f63db

Browse files
gabitoesmiapodofernandomg
authored andcommitted
fix: max and self button styles
1 parent 2c0ffe9 commit b9f63db

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
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/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/tailwind.config.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,19 @@ module.exports = {
3232
800: '#11213B',
3333
900: '#0D192C',
3434
},
35+
secondary: {
36+
100: '#fff1e5',
37+
200: '#f7a35f',
38+
300: '#ffe8d4',
39+
},
3540
accent: {
3641
50: '#FAEAF8',
3742
100: '#F2C1EA',
3843
200: '#EA98DC',
3944
300: '#E26ECE',
4045
400: '#DA45C0',
41-
500: '#fb8e56',
42-
600: '#fc6e4f',
46+
500: '#f7a35f',
47+
600: '#e8995a',
4348
700: '#fb5247',
4449
800: '#6B185C',
4550
900: '#400E37',

0 commit comments

Comments
 (0)