forked from MystenLabs/sui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wallet-ext: home/main view design update
* use new design for main view and make content container scroll instead of the whole view * move network-switch to settings page
- Loading branch information
1 parent
b03217a
commit c8e09bb
Showing
33 changed files
with
178 additions
and
106 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,35 @@ | ||
.logo { | ||
width: 60px; | ||
} | ||
@use '_variables' as v; | ||
|
||
.container { | ||
display: flex; | ||
flex-flow: column nowrap; | ||
width: 400px; | ||
padding-bottom: 12px; | ||
min-height: 450px; | ||
|
||
:global(.is-popup) & { | ||
min-height: 400px; | ||
width: 350px; | ||
padding-bottom: 0; | ||
} | ||
flex-grow: 1; | ||
width: 100%; | ||
max-height: 100%; | ||
} | ||
|
||
.outer-container { | ||
.header { | ||
display: flex; | ||
flex-flow: row nowrap; | ||
align-items: center; | ||
padding: 8px 12px; | ||
justify-content: space-between; | ||
padding: 0 15px; | ||
justify-content: center; | ||
min-height: 52px; | ||
} | ||
|
||
.inner-container { | ||
.content { | ||
display: flex; | ||
flex-flow: column nowrap; | ||
align-items: center; | ||
background-color: #d1d9e1; | ||
padding: 22px; | ||
border-radius: 2px; | ||
flex: 1; | ||
box-shadow: 0 0 3px 0 #365876; | ||
|
||
:global(.is-popup) & { | ||
padding: 12px; | ||
box-shadow: none; | ||
} | ||
} | ||
|
||
.network { | ||
display: flex; | ||
flex-flow: row nowrap; | ||
align-items: center; | ||
margin-left: 10px; | ||
background: v.use(v.$colors-main-content-background); | ||
padding: 25px; | ||
border-radius: 20px 20px 0 0; | ||
flex-grow: 1; | ||
box-shadow: v.use(v.$shadows-main-content); | ||
overflow: auto; | ||
max-height: 100%; | ||
} | ||
|
||
.network-icon { | ||
font-size: 10px; | ||
} | ||
|
||
.network-name { | ||
color: #000; | ||
font-weight: 300; | ||
margin-left: 4px; | ||
.logo { | ||
color: v.use(v.$colors-text-on-background); | ||
} |
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 |
---|---|---|
|
@@ -37,3 +37,7 @@ | |
align-self: stretch; | ||
margin-top: 6px; | ||
} | ||
|
||
.network { | ||
position: relative; | ||
} |
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
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,13 @@ | ||
@use '_values/dimensions'; | ||
|
||
.container { | ||
display: flex; | ||
align-items: center; | ||
flex-flow: column nowrap; | ||
|
||
&.forced-popup-dimensions, | ||
:global(.is-popup) & { | ||
width: dimensions.$popup-width; | ||
height: dimensions.$popup-height; | ||
} | ||
} |
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,39 @@ | ||
// Copyright (c) 2022, Mysten Labs, Inc. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
import cl from 'classnames'; | ||
import { memo } from 'react'; | ||
|
||
import Loading from '_components/loading'; | ||
import { useFullscreenGuard } from '_hooks'; | ||
|
||
import type { ReactNode } from 'react'; | ||
|
||
import st from './Layout.module.scss'; | ||
|
||
export type PageLayoutProps = { | ||
limitToPopUpSize?: boolean; | ||
forceFullscreen?: boolean; | ||
children: ReactNode | ReactNode[]; | ||
}; | ||
|
||
function PageLayout({ | ||
limitToPopUpSize = false, | ||
forceFullscreen = false, | ||
children, | ||
}: PageLayoutProps) { | ||
const guardLoading = useFullscreenGuard(forceFullscreen); | ||
return ( | ||
<Loading loading={guardLoading}> | ||
<div | ||
className={cl(st.container, { | ||
[st.forcedPopupDimensions]: limitToPopUpSize, | ||
})} | ||
> | ||
{children} | ||
</div> | ||
</Loading> | ||
); | ||
} | ||
|
||
export default memo(PageLayout); |
Oops, something went wrong.