Skip to content

Commit

Permalink
fix: minor UI Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
VAIBHAV-25 committed Nov 28, 2023
1 parent 1aacfbf commit 93eab85
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/components/WalletButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,17 @@ const WalletButton = ({ isloginFlow, disabled, onClick, icon, className, text, n
<>
{!isOptionalLogin && isloginFlow && (
<Tooltip
// color='#E5007A'
title={`${text} wallet ${isAvailable ? '' : 'not'} installed`}
placement='top'
>
<Button
className={`flex ${isOptionalLogin ? 'border_grey_stroke w-full' : 'justify-center border-[#F8E3EE]'} ${
isAvailable ? 'bg-white' : 'bg-grey_stroke bg-[#F6F7F9] dark:bg-[#3d3d3d]'
} items-center rounded-[7px] border-[#F8E3EE] dark:border-section-dark-container dark:bg-[#222222] ${name !== 'Polkasafe' ? 'px-5 py-6' : 'px-3 py-5'} ${className}`}
onClick={onClick}
className={`flex ${isOptionalLogin ? 'border_grey_stroke w-full' : 'border-borderColor justify-center'} ${
isAvailable ? 'bg-white dark:bg-inactiveIconDark' : 'bg-grey_stroke dark:bg-greyColor bg-lightWhite cursor-not-allowed'
} border-borderColor items-center rounded-[7px] dark:border-section-dark-container ${name !== 'Polkasafe' ? 'px-5 py-6' : 'px-3 py-5'} ${className}`}
onClick={(e) => {
if (!isAvailable) return;
onClick(e as any);
}}
disabled={disabled}
>
<span className={name !== 'Polkasafe' ? 'mt-1.5' : 'mt-3'}>{icon}</span>
Expand All @@ -39,20 +41,20 @@ const WalletButton = ({ isloginFlow, disabled, onClick, icon, className, text, n
)}
{isOptionalLogin && isloginFlow && (
<Button
className={`flex ${isOptionalLogin ? 'border_grey_stroke w-full' : 'justify-center border-[#F8E3EE]'} ${
isAvailable ? 'text- bg-white' : 'bg-[#F6F7F9] dark:bg-[#3d3d3d]'
} items-center rounded-[7px] border-[#F8E3EE] dark:border-section-dark-container dark:bg-[#222222] ${name !== 'Polkasafe' ? 'px-5 py-6' : 'px-3 py-5'} ${className}`}
className={`flex ${isOptionalLogin ? 'border_grey_stroke w-full' : 'border-borderColor justify-center'} ${
isAvailable ? 'text- bg-white dark:bg-inactiveIconDark' : 'dark:bg-greyColor bg-lightWhite'
} border-borderColor items-center rounded-[7px] dark:border-section-dark-container ${name !== 'Polkasafe' ? 'px-5 py-6' : 'px-3 py-5'} ${className}`}
onClick={onClick}
disabled={!isAvailable}
>
<span className={name !== 'Polkasafe' ? 'mt-1.5' : 'mt-3'}>{icon}</span>
{text && isOptionalLogin && <p className={`wallet-text-container m-0 ml-4 p-0 ${!isAvailable ? 'text-disableText' : 'text-lightBlue'} dark:text-white`}>{text}</p>}
{isOptionalLogin && !isAvailable && <p className='not-installed-container text-disableText m-0 ml-auto p-0 text-xs dark:text-[#909090]'>Not Installed</p>}
{isOptionalLogin && !isAvailable && <p className='not-installed-container text-disableText dark:text-lightGreyTextColor m-0 ml-auto p-0 text-xs'>Not Installed</p>}
</Button>
)}
{!isloginFlow && (
<Button
className={`flex items-center justify-center rounded-[7px] border-[#F8E3EE] dark:border-section-dark-container dark:bg-[#222222] ${
className={`border-borderColor flex items-center justify-center rounded-[7px] dark:border-section-dark-container dark:bg-inactiveIconDark ${
name !== 'Polkasafe' ? 'px-5 py-6' : 'px-3 py-5'
} ${className}`}
onClick={onClick}
Expand Down
4 changes: 4 additions & 0 deletions styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@
--errorAlertBgDark: #FF3C5F33;
--warningAlertBorderDark: #F89118;
--warningAlertBgDark: #F8911833;
--borderColor: #F8E3EE;
--greyColor: #3d3d3d;
--lightGreyTextColor: #909090;
--lightWhite: #F6F7F9
}

::-webkit-scrollbar {
Expand Down
4 changes: 4 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ module.exports = {
errorAlertBgDark: 'var(--errorAlertBgDark)',
warningAlertBorderDark: 'var(--warningAlertBorderDark)',
warningAlertBgDark: 'var(--warningAlertBgDark)',
borderColor: 'var(--borderColor)',
greyColor: 'var(--greyColor)',
lightGreyTextColor: 'var(--lightGreyTextColor)',
lightWhite: 'var(--lightWhite)',
blue: {
light: {
disabled: '#96A4B6',
Expand Down

0 comments on commit 93eab85

Please sign in to comment.