-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #55 from ChainSafe/lykhoyda/transfer-balance
Lykhoyda/transfer balance
- Loading branch information
Showing
44 changed files
with
963 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React from 'react'; | ||
type ButtonVariant = 'primary' | 'secondary'; | ||
|
||
interface ButtonProps { | ||
onClick: () => void; | ||
label: string; | ||
classNames?: string; | ||
variant?: ButtonVariant; | ||
icon?: React.ReactNode; | ||
} | ||
|
||
function Button({ | ||
onClick, | ||
label, | ||
classNames = '', | ||
variant = 'primary', | ||
icon, | ||
}: ButtonProps) { | ||
const baseClasses = | ||
'min-w-[228px] px-6 py-3 rounded-3xl text-base font-medium leading-normal cursor-pointer transition-all hover:transition-all'; | ||
|
||
const variantClasses = | ||
variant === 'primary' | ||
? 'bg-[#0e0e0e] text-white border hover:bg-buttonBlackGradientHover' | ||
: 'bg-transparent text-black hover:bg-[#fff7e6] border hover:border-[#ffa940]'; | ||
|
||
return ( | ||
<button | ||
onClick={onClick} | ||
className={`${baseClasses} ${variantClasses} ${classNames}`} | ||
> | ||
<div className="flex items-center justify-center"> | ||
{icon && <span className="mr-2 flex items-center">{icon}</span>} | ||
<span>{label}</span> | ||
</div> | ||
</button> | ||
); | ||
} | ||
|
||
export default Button; |
11 changes: 11 additions & 0 deletions
11
packages/web-wallet/src/components/ErrorMessage/ErrorMessage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from 'react'; | ||
|
||
interface ErrorMessageProps { | ||
text?: string; | ||
} | ||
|
||
function ErrorMessage({ text }: ErrorMessageProps): React.JSX.Element { | ||
return <>{text && <span className="text-sm text-red-500">{text}</span>}</>; | ||
} | ||
|
||
export default ErrorMessage; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import React from 'react'; | ||
import ErrorMessage from '@components/ErrorMessage/ErrorMessage'; | ||
|
||
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> { | ||
label?: string; | ||
error?: string; | ||
containerClassName?: string; | ||
labelClassName?: string; | ||
inputClassName?: string; | ||
suffix?: string; | ||
id: string; | ||
} | ||
|
||
const Input: React.FC<InputProps> = ({ | ||
label, | ||
error, | ||
containerClassName = '', | ||
labelClassName = '', | ||
inputClassName = '', | ||
suffix = '', | ||
id, | ||
...props | ||
}) => { | ||
return ( | ||
<div className={`flex flex-col gap-1 w-full ${containerClassName}`}> | ||
{label && ( | ||
<label | ||
htmlFor={id} | ||
className={`text-black text-base font-normal leading-normal ${labelClassName}`} | ||
> | ||
{label} | ||
</label> | ||
)} | ||
<div className="h-full flex items-center bg-neutral-50 rounded-xl border border-[#afafaf] p-3"> | ||
<input | ||
{...props} | ||
id={id} | ||
className={`flex-grow bg-transparent focus:outline-none text-[#0e0e0e] text-base font-semibold font-inter ${inputClassName}`} | ||
aria-describedby={`${id}-suffix`} | ||
/> | ||
<span | ||
id={`${id}-suffix`} | ||
className="ml-2 text-[#a9aaab] text-base font-medium leading-normal" | ||
> | ||
{suffix} | ||
</span> | ||
</div> | ||
<ErrorMessage text={error} /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Input; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
9ec987d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://webz-demo.netlify.app as production
🚀 Deployed on https://677eb2f05eff1db27de73cb8--webz-demo.netlify.app