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

added default and custom token lists to import #49

Merged
merged 10 commits into from
Dec 18, 2024
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Image, Text } from '@0xsequence/design-system'
import { Box, Image, Text } from '@0xsequence/design-system'
import { motion } from 'framer-motion'

import { useStore } from '~/stores'
Expand Down Expand Up @@ -57,38 +57,38 @@ export const MobileDrawerContent = () => {
borderLeftColor="backgroundBackdrop"
style={{ width: '75%' }}
>
<Box
// flexDirection="row"
// alignItems="center"
// background="buttonGlass"
// borderRadius="sm"
gap="2"
// style={{ cursor: 'pointer', padding: '8px 16px 8px 8px' }}
onClick={() => window.open('https://docs.sequence.xyz/')}
>
<Image src={externalArrowIcon} height="5" />
<Text variant="normal" fontWeight="bold" color="text50">
Docs
</Text>
</Box>
<Box
// flexDirection="row"
// alignItems="center"
// background="buttonGlass"
// borderRadius="sm"
gap="2"
// style={{ cursor: 'pointer', padding: '8px 16px 8px 8px' }}
onClick={() => window.open('https://docs.sequence.xyz/')}
>
<Image src={externalArrowIcon} height="5" />
<Text variant="normal" fontWeight="bold" color="text50">
Docs
</Text>
</Box>

<Box
// flexDirection="row"
// alignItems="center"
// background="buttonGlass"
// borderRadius="sm"
gap="2"
// style={{ cursor: 'pointer', padding: '8px 16px 8px 8px' }}
onClick={() => {
openNetworkModal()
toggleNavDrawer(false)
}}
>
<Image src={networkIcon} height="5" />
<Text variant="normal" fontWeight="bold" color="text50">
Networks
</Text>
</Box>
<Box
// flexDirection="row"
// alignItems="center"
// background="buttonGlass"
// borderRadius="sm"
gap="2"
// style={{ cursor: 'pointer', padding: '8px 16px 8px 8px' }}
onClick={() => {
andrewlee348 marked this conversation as resolved.
Show resolved Hide resolved
openNetworkModal()
toggleNavDrawer(false)
}}
>
<Image src={networkIcon} height="5" />
<Text variant="normal" fontWeight="bold" color="text50">
Networks
</Text>
</Box>
</Box>
</Box>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useObservable, useStore } from '~/stores'
import { AuthStore } from '~/stores/AuthStore'
import { WalletStore } from '~/stores/WalletStore'

import SettingsDropdownMenu from '~/components/wallet/WalletDropdownMenu'
import SettingsDropdownMenu from '~/components/header/WalletDropdownMenu'

import networkIcon from '~/assets/icons/chain.svg'
import externalArrowIcon from '~/assets/icons/external-link-arrow.svg'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { truncateMiddle } from '~/utils/truncatemiddle'
import { useObservable, useStore } from '~/stores'
import { AuthStore } from '~/stores/AuthStore'

import ConfirmSignOut from './ConfirmSignOut'
import ConfirmSignOut from '~/components/wallet/ConfirmSignOut'

export default function SettingsDropdownMenu() {
const authStore = useStore(AuthStore)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ export const navDrawer = style([
left: '0',

width: 'vw',
height: 'vh',
}),
height: 'vh'
})
])
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Box } from '@0xsequence/design-system'
import { Box, BoxProps } from '@0xsequence/design-system'

import Checkmark from '~/assets/icons/checkmark.svg'
import EmptyCheckBox from '~/assets/icons/square-checkbox.svg'

export default function FilledCheckBox({ checked, size = 'lg' }: { checked: boolean; size?: 'lg' | 'md' }) {
export function FilledCheckBox({ checked, size = 'lg', ...rest }: { checked: boolean; size?: 'lg' | 'md' } & BoxProps) {
return (
<Box
justifyContent="center"
Expand All @@ -14,6 +14,7 @@ export default function FilledCheckBox({ checked, size = 'lg' }: { checked: bool
borderRadius: size === 'lg' ? '6px' : '3px',
background: checked ? '#4F4F4F' : 'inherit'
}}
{...rest}
>
{checked ? (
<img
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Box } from '@0xsequence/design-system'
import { Box, BoxProps } from '@0xsequence/design-system'

import CheckmarkBlack from '~/assets/icons/checkmark-black.svg'
import EmptyRoundCheckBox from '~/assets/icons/round-checkbox.svg'

export const ROUND_CHECKBOX_SIZE = 8

export default function FilledCheckBox({ checked }: { checked: boolean }) {
export function FilledRoundCheckBox({ checked, ...rest }: { checked: boolean } & BoxProps) {
return (
<Box
width={`${ROUND_CHECKBOX_SIZE}`}
Expand All @@ -14,6 +14,7 @@ export default function FilledCheckBox({ checked }: { checked: boolean }) {
alignItems="center"
background={checked ? 'white' : 'transparent'}
borderRadius="circle"
{...rest}
>
{checked ? (
<img src={CheckmarkBlack} alt="Checkmark" style={{ width: '24px', height: '24px' }} />
Expand Down
6 changes: 6 additions & 0 deletions src/components/misc/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { FilledCheckBox } from '~/components/misc/FilledCheckBox'
import { FilledRoundCheckBox, ROUND_CHECKBOX_SIZE } from '~/components/misc/FilledRoundCheckBox'
import { ButtonWithIcon } from '~/components/misc/ButtonWithIcon'
import { ExternalIcon } from '~/components/misc/ExternalIcon'

export { FilledCheckBox, FilledRoundCheckBox, ROUND_CHECKBOX_SIZE, ButtonWithIcon, ExternalIcon }
2 changes: 1 addition & 1 deletion src/components/network/NetworkItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { ChangeEvent, useEffect, useState } from 'react'
import { useObservable, useStore } from '~/stores'
import { NetworkStore, createDebugLocalRelayer } from '~/stores/NetworkStore'

import FilledCheckBox from '~/components/helpers/FilledCheckBox'
import { FilledCheckBox } from '~/components/misc'

export default function NetworkItem({ network }: { network: NetworkConfig }) {
const networkStore = useStore(NetworkStore)
Expand Down
4 changes: 2 additions & 2 deletions src/components/recovery/WalletList.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Box, Text, truncateAddress } from '@0xsequence/design-system'
import { useState } from 'react'

import FilledRoundCheckBox, { ROUND_CHECKBOX_SIZE } from '~/components/helpers/FilledRoundCheckBox'
import { FilledRoundCheckBox, ROUND_CHECKBOX_SIZE } from '~/components/misc'

export default function WalletList({
possibleWallets,
Expand Down Expand Up @@ -46,7 +46,7 @@ export default function WalletList({
width="full"
>
<Text
variant='normal'
variant="normal"
fontWeight="medium"
color="text100"
style={{ fontFamily: 'monospace' }}
Expand Down
4 changes: 2 additions & 2 deletions src/components/signing/ConnectionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { SessionTypes } from '@walletconnect/types'
import { useStore } from '~/stores'
import { WalletConnectSignClientStore } from '~/stores/WalletConnectSignClientStore'

import { ButtonWithIcon } from '~/components/helpers/ButtonWithIcon'
import { ExternalIcon } from '~/components/helpers/ExternalIcon'
import { ButtonWithIcon } from '~/components/misc/ButtonWithIcon'
import { ExternalIcon } from '~/components/misc/ExternalIcon'

export default function ConnectionList({ sessionList }: { sessionList: SessionTypes.Struct[] }) {
const walletConnectSignClientStore = useStore(WalletConnectSignClientStore)
Expand Down
2 changes: 1 addition & 1 deletion src/components/wallet/PendingIndicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useObservable } from 'micro-observables'
import { useStore } from '~/stores'
import { WalletStore } from '~/stores/WalletStore'

import PendingTxn from '~/components/PendingTxn'
import PendingTxn from '~/components/wallet/PendingTxn'

export default function PendingIndicator({ ...rest }: BoxProps) {
const walletStore = useStore(WalletStore)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, Spinner, Text } from '@0xsequence/design-system'

import NetworkTag from './network/NetworkTag'
import NetworkTag from '~/components/network/NetworkTag'

export default function PendingTxn({
symbol,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { BigNumberish, ethers } from 'ethers'

import { CollectibleInfo } from '~/stores/CollectibleStore'

import { ButtonWithIcon } from '~/components/helpers/ButtonWithIcon'
import { ExternalIcon } from '~/components/helpers/ExternalIcon'
import { ButtonWithIcon } from '~/components/misc/ButtonWithIcon'
import { ExternalIcon } from '~/components/misc/ExternalIcon'
import NetworkTag from '~/components/network/NetworkTag'

import SendIcon from '~/assets/icons/send.svg'
Expand Down
10 changes: 9 additions & 1 deletion src/components/wallet/collectibles/CollectibleList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,15 @@ export default function CollectibleList({
</Box>

{isImportCollectibleViewOpen && (
<Modal size="sm" onClose={() => setIsImportCollectibleViewOpen(false)}>
<Modal
onClose={() => setIsImportCollectibleViewOpen(false)}
contentProps={{
style: {
scrollbarColor: 'gray black',
scrollbarWidth: 'thin'
}
}}
>
<ImportCollectible onClose={() => setIsImportCollectibleViewOpen(false)} />
</Modal>
)}
Expand Down
Loading
Loading