Skip to content

Commit 382823c

Browse files
committed
feat: more headers,
feat: added homescreen tabs, feat: added modal border
1 parent 93c059f commit 382823c

21 files changed

Lines changed: 233 additions & 52 deletions

File tree

packages/connect/src/index.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,15 @@ export {
4444

4545
// Utils
4646
export { getConnectWallets } from './utils/getConnectWallets.js'
47-
export { capitalize, compareAddress, formatAddress, formatDisplay, isEmailValid, truncateAtMiddle } from './utils/helpers.js'
47+
export {
48+
capitalize,
49+
compareAddress,
50+
formatAddress,
51+
formatDisplay,
52+
isEmailValid,
53+
truncateAtIndex,
54+
truncateAtMiddle
55+
} from './utils/helpers.js'
4856
export { createNativeTokenBalance, getNativeTokenInfoByChainId } from './utils/tokens.js'
4957
export { getModalPositionCss } from './utils/styling.js'
5058
export { getNetwork, getNetworkBackgroundColor, getNetworkColor } from './utils/networks.js'

packages/connect/src/styles.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ export const styles = String.raw`
241241
.left-4 {
242242
left: calc(var(--spacing) * 4);
243243
}
244+
.left-\[-16px\] {
245+
left: -16px;
246+
}
244247
.z-1 {
245248
z-index: 1;
246249
}
@@ -433,6 +436,9 @@ export const styles = String.raw`
433436
.h-\[1px\] {
434437
height: 1px;
435438
}
439+
.h-\[2px\] {
440+
height: 2px;
441+
}
436442
.h-\[52px\] {
437443
height: 52px;
438444
}

packages/connect/src/utils/helpers.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,16 @@ export const truncateAtMiddle = (text: string, truncateAt: number) => {
107107
return finalText
108108
}
109109

110+
export const truncateAtIndex = (text: string, truncateIndex: number) => {
111+
let finalText = text
112+
113+
if (text.length >= truncateIndex) {
114+
finalText = text.slice(0, truncateIndex) + '...' + text.slice(text.length - 4, text.length)
115+
}
116+
117+
return finalText
118+
}
119+
110120
export const formatAddress = (text: string) => {
111121
return `0x${truncateAtMiddle(text?.substring(2) || '', 8)}`
112122
}

packages/wallet-widget/src/components/Filter/WalletsFilter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export const WalletsFilter = () => {
5050
}
5151
onClick={() => setSelectedWallets([wallet])}
5252
>
53-
<WalletAccountGradient accountAddress={wallet.address} size={'small'} />
53+
<WalletAccountGradient accountAddress={wallet.address} />
5454
<Text className="flex flex-row gap-1 items-center" nowrap color="primary" fontWeight="medium" variant="normal">
5555
{formatAddress(wallet.address)}
5656
<CopyButton text={wallet.address} buttonVariant="icon" onClick={e => e.stopPropagation()} />
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { Image, Text } from '@0xsequence/design-system'
2+
3+
export const Collectible = ({ imgSrc, imgLabel }: { imgSrc?: string; imgLabel?: string }) => {
4+
return (
5+
<div className="flex flex-row items-center h-full w-full">
6+
<div className="px-3">
7+
<Image
8+
className="w-9 h-9"
9+
src={imgSrc}
10+
alt={imgLabel}
11+
style={{
12+
objectFit: 'cover'
13+
}}
14+
/>
15+
</div>
16+
<div className="flex flex-col">
17+
<Text variant="medium" color="text100">
18+
{imgLabel}
19+
</Text>
20+
</div>
21+
</div>
22+
)
23+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import { Image, Text } from '@0xsequence/design-system'
2+
3+
export const Collection = ({ imgSrc, imgLabel }: { imgSrc?: string; imgLabel?: string }) => {
4+
return (
5+
<div className="flex flex-row items-center h-full w-full">
6+
<div className="px-3">
7+
<Image
8+
className="w-9 h-9"
9+
src={imgSrc}
10+
alt={imgLabel}
11+
style={{
12+
objectFit: 'cover'
13+
}}
14+
/>
15+
</div>
16+
<div className="flex flex-col">
17+
<Text variant="medium" color="text100">
18+
{imgLabel}
19+
</Text>
20+
</div>
21+
</div>
22+
)
23+
}

packages/wallet-widget/src/components/NavigationHeader/content/home.tsx renamed to packages/wallet-widget/src/components/NavigationHeader/content/Home.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const Home = () => {
99
<IconButton className="bg-background-secondary" icon={SearchIcon} size="sm" />
1010
<IconButton className="bg-background-secondary" icon={SettingsIcon} size="sm" />
1111
</div>
12-
<Divider className="my-0 w-full" />
12+
<Divider className="my-0 w-full" style={{ position: 'absolute', bottom: 0 }} />
1313
</div>
1414
)
1515
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { TextInput } from '@0xsequence/design-system'
2+
3+
export const Search = () => {
4+
return (
5+
<div className="grow px-4">
6+
<TextInput autoFocus placeholder="Search" name={'Search Wallet'} />
7+
</div>
8+
)
9+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// import { Text } from '@0xsequence/design-system'
2+
3+
// export const Settings = () => {
4+
// return (
5+
// <div className="flex flex-row justify-center items-center p-4 gap-3 w-full">
6+
// <Text variant="medium" color="text100">
7+
// Settings
8+
// </Text>
9+
// </div>
10+
// )
11+
// }
12+
import { Text } from '@0xsequence/design-system'
13+
14+
export const Settings = () => {
15+
return (
16+
<div className="flex flex-col justify-center items-center">
17+
<Text variant="medium" color="text100">
18+
Settings
19+
</Text>
20+
</div>
21+
)
22+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export const Token = () => {
2+
return <div></div>
3+
}

0 commit comments

Comments
 (0)