forked from anoma/namada
-
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.
Merge pull request anoma#21 from heliaxdev/feat/17/settings_accounts_…
…and_navigation # 17 settings/accounts screen and navigation
- Loading branch information
Showing
62 changed files
with
1,056 additions
and
259 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
packages/anoma-wallet/src/App/AccountOverview/AccountOverview.components.ts
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,10 @@ | ||
import styled from "styled-components/macro"; | ||
|
||
export const AccountOverviewContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: start; | ||
align-items: center; | ||
width: 100%; | ||
height: 100%; | ||
`; |
20 changes: 20 additions & 0 deletions
20
packages/anoma-wallet/src/App/AccountOverview/AccountOverview.tsx
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,20 @@ | ||
import { NavigationContainer } from "components/NavigationContainer"; | ||
import { Heading, HeadingLevel } from "components/Heading"; | ||
import { AccountOverviewContainer } from "./AccountOverview.components"; | ||
|
||
export const AccountOverview = (): JSX.Element => { | ||
return ( | ||
<AccountOverviewContainer> | ||
<NavigationContainer> | ||
<Heading level={HeadingLevel.One}>AccountOverview</Heading> | ||
</NavigationContainer> | ||
<a | ||
href="https://github.com/anoma/spec/blob/master/src/architecture/namada/web-wallet/user-interfaces.md#accountoverview-1" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
AccountOverview | ||
</a> | ||
</AccountOverviewContainer> | ||
); | ||
}; |
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 @@ | ||
export { AccountOverview } from "./AccountOverview"; |
74 changes: 37 additions & 37 deletions
74
...untCreation/AccountCreation.components.ts → ...es/anoma-wallet/src/App/App.components.ts
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,63 +1,63 @@ | ||
import styled from "styled-components/macro"; | ||
import { motion } from "framer-motion"; | ||
|
||
export const MainSectionContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: start; | ||
align-items: center; | ||
// TODO: maybe this is too hacky? maybe there could be just another div | ||
// behind the main one with transform: translate(-4px, 4px); | ||
box-sizing: border-box; | ||
background-color: ${(props) => props.theme.colors.background2}; | ||
padding: ${(props) => | ||
props.theme.themeConfigurations.isLightMode ? "0 32px" : "4px 36px 0 32px"}; | ||
height: 620px; | ||
width: 480px; | ||
border-radius: 24px; | ||
overflow-x: hidden; | ||
${(props) => | ||
props.theme.themeConfigurations.isLightMode | ||
? `border: solid 4px ${props.theme.colors.border}` | ||
: ""}; | ||
border-left: solid 8px ${(props) => props.theme.colors.border}; | ||
border-bottom: solid 8px ${(props) => props.theme.colors.border}; | ||
transition: background-color 0.3s linear; | ||
`; | ||
|
||
export const MotionContainer = styled(motion.div)` | ||
display: flex; | ||
height: 100%; | ||
width: 100%; | ||
box-sizing: border-box; | ||
padding: 0 0 64px 0; | ||
`; | ||
export const TopSection = styled.section` | ||
|
||
export const AppContainer = styled.div` | ||
display: flex; | ||
justify-content: start; | ||
justify-content: space-between; | ||
align-items: center; | ||
flex-direction: column; | ||
height: 100%; | ||
width: 100%; | ||
margin: 32px 0; | ||
background-color: ${(props) => props.theme.colors.background1}; | ||
transition: all 0.3s linear; | ||
`; | ||
|
||
export const TopSectionHeaderContainer = styled.section` | ||
export const TopSection = styled.section` | ||
display: flex; | ||
justify-content: center; | ||
width: 100%; | ||
align-items: center; | ||
height: 120px; | ||
width: 100%; | ||
`; | ||
|
||
export const TopSectionButtonContainer = styled.section` | ||
export const BottomSection = styled.section` | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
width: 48px; | ||
min-height: 50px; | ||
height: calc(100% - 120px); | ||
width: 100%; | ||
`; | ||
|
||
export const RouteContainer = styled.div` | ||
export const ContentContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
overflow: scroll; | ||
width: 100%; | ||
height: 100%; | ||
// TODO: maybe this is too hacky? maybe there could be just another div | ||
// behind the main one with transform: translate(-4px, 4px); | ||
box-sizing: border-box; | ||
background-color: ${(props) => props.theme.colors.background2}; | ||
padding: ${(props) => | ||
props.theme.themeConfigurations.isLightMode | ||
? "16px 32px 32px" | ||
: "20px 36px 32px 32px"}; | ||
height: 620px; | ||
width: 480px; | ||
border-radius: 24px; | ||
overflow-x: hidden; | ||
${(props) => | ||
props.theme.themeConfigurations.isLightMode | ||
? `border: solid 4px ${props.theme.colors.border}` | ||
: ""}; | ||
border-left: solid 8px ${(props) => props.theme.colors.border}; | ||
border-bottom: solid 8px ${(props) => props.theme.colors.border}; | ||
transition: background-color 0.3s linear; | ||
`; |
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.
10 changes: 10 additions & 0 deletions
10
packages/anoma-wallet/src/App/Settings/Settings.components.ts
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,10 @@ | ||
import styled from "styled-components/macro"; | ||
|
||
export const SettingsContainer = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: start; | ||
align-items: center; | ||
width: 100%; | ||
height: 100%; | ||
`; |
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 @@ | ||
import { useNavigate } from "react-router-dom"; | ||
import { NavigationContainer } from "components/NavigationContainer"; | ||
import { TopLevelRoute } from "App/types"; | ||
import { Button, ButtonVariant } from "components/Button"; | ||
import { Heading, HeadingLevel } from "components/Heading"; | ||
import { SettingsContainer } from "./Settings.components"; | ||
|
||
/** | ||
* This is the root component for Settings, it contains further screens that are | ||
* being navigated to from here (or directly from some other locations in the app). | ||
*/ | ||
export const Settings = (): JSX.Element => { | ||
const navigate = useNavigate(); | ||
return ( | ||
<SettingsContainer> | ||
<NavigationContainer> | ||
<Heading level={HeadingLevel.Two}>Settings</Heading> | ||
</NavigationContainer> | ||
|
||
{/* accounts button */} | ||
<Button | ||
onClick={() => navigate(TopLevelRoute.SettingsAccounts)} | ||
variant={ButtonVariant.Contained} | ||
style={{ minWidth: "50%" }} | ||
> | ||
Accounts | ||
</Button> | ||
|
||
{/* wallet settings */} | ||
<Button | ||
onClick={() => navigate(TopLevelRoute.SettingsWalletSettings)} | ||
variant={ButtonVariant.Contained} | ||
style={{ minWidth: "50%" }} | ||
> | ||
Wallet Settings | ||
</Button> | ||
</SettingsContainer> | ||
); | ||
}; |
Oops, something went wrong.