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

feat(receive): new layout #543

Merged
merged 3 commits into from
Feb 1, 2024
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
2 changes: 1 addition & 1 deletion palette.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ module.exports = {
},

alpha: {
whiteAlpha300: '#FFFFFF29',
whiteAlpha300: 'rgba(255, 255, 255, 0.16)',
whiteAlpha200: 'rgba(255, 255, 255, 0.08)',
},

Expand Down
23 changes: 14 additions & 9 deletions source/pages/Receive/Receive.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { Layout, NeutralButton } from 'components/index';
import { LoadingComponent } from 'components/Loading';
import { useUtils } from 'hooks/index';
import { RootState } from 'state/store';
import { ellipsis } from 'utils/index';

export const Receive = () => {
const { useCopyClipboard, alert } = useUtils();
Expand Down Expand Up @@ -37,31 +36,37 @@ export const Receive = () => {
id="receiveSYS-title"
>
{activeAccount.address ? (
<div className="flex flex-col items-center justify-center w-full">
<div className="flex flex-col items-center justify-center w-screen">
<div id="qr-code">
<QRCodeSVG
value={activeAccount.address}
bgColor="#fff"
fgColor="#000"
style={{
height: '240px',
width: '225px',
height: '186px',
width: '186px',
padding: '6px',
backgroundColor: '#fff',
borderRadius: '10px',
}}
/>
</div>

<p className="mt-4 text-base">
{ellipsis(activeAccount.address, 4, 10)}
</p>
<div className="flex flex-wrap w-[60%]">
<p
className="mt-4 text-sm text-center"
style={{ wordBreak: 'break-all' }}
>
{activeAccount.address}
</p>
</div>

<div
className="absolute bottom-12 md:static md:mt-6"
className="relative w-[96%] mt-36 md:static md:mt-6"
id="copy-address-receive-btn"
>
<NeutralButton
type="button"
fullWidth={true}
onClick={() => copyText(activeAccount.address)}
>
<span className="text-xs">{t('buttons.copy')}</span>
Expand Down
8 changes: 4 additions & 4 deletions source/pages/Send/SendEth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ export const SendEth = () => {
<span
className={`${
hasAccountAssets ? 'flex' : 'hidden'
} items-center justify-center px-5 bg-fields-input-primary hover:bg-opacity-30 border border-fields-input-border rounded-l-full`}
} items-center absolute left-[71%] z-[99] h-[40px] justify-center px-5 bg-transparent hover:bg-opacity-30`}
>
{hasAccountAssets ? (
<Form.Item
Expand All @@ -301,12 +301,12 @@ export const SendEth = () => {
<div className="relative inline-block text-left">
<Menu.Button
disabled={!hasAccountAssets}
className="inline-flex justify-center py-3 w-full text-white text-sm font-medium"
className="inline-flex justify-center items-center py-3 w-full text-white text-xs font-normal"
>
{String(getLabel())}

<ChevronDoubleDownIcon
className="text-violet-200 hover:text-violet-100 -mr-1 ml-2 w-5 h-5"
className="text-white hover:text-violet-100 -mr-1 ml-2 w-5 h-5"
aria-hidden="true"
/>
</Menu.Button>
Expand All @@ -323,7 +323,7 @@ export const SendEth = () => {
{hasAccountAssets ? (
<Menu.Items
as="div"
className="scrollbar-styled absolute z-10 left-0 mt-2 py-3 w-44 h-56 text-brand-white font-poppins bg-bkg-3 border border-fields-input-border focus:border-fields-input-borderfocus rounded-2xl shadow-2xl overflow-auto origin-top-right"
className="scrollbar-styled absolute z-10 left-[-103px] mt-[1px] py-3 w-44 h-56 text-brand-white font-poppins bg-brand-blue800 border border-alpha-whiteAlpha300 rounded-2xl shadow-2xl overflow-auto origin-top-right"
>
<Menu.Item>
<button
Expand Down
Loading