-
Notifications
You must be signed in to change notification settings - Fork 76
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
New UI #1890
New UI #1890
Changes from 6 commits
3d53613
3731d17
5e27e95
349bcf2
a5bcb41
54382a5
ab8d253
0538b3a
f5f7f57
8885e90
efb2946
c950dc7
8a0dfbf
baf3880
bf78404
53eabd9
21b5cd1
c64574d
d507c19
67793bc
f76cb6b
b641863
f170f02
a0d7191
a164adf
03080a3
a050ad4
fad2ecd
00b2e4a
b37d0df
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { CenterColumn, TextCenter } from "../components/core"; | ||
import { AppContainer } from "../components/shared/AppContainer"; | ||
import { BigInput } from "./Input"; | ||
import { Typography } from "./Typography"; | ||
|
||
const ComponentsScreen = (): JSX.Element => { | ||
return ( | ||
<AppContainer bg="gray"> | ||
<TextCenter>Hello, world!</TextCenter> | ||
<Typography>Typography component</Typography> | ||
<CenterColumn> | ||
<BigInput placeholder="placeholder" /> | ||
</CenterColumn> | ||
</AppContainer> | ||
); | ||
}; | ||
|
||
export default ComponentsScreen; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { InputHTMLAttributes, Ref } from "react"; | ||
import styled from "styled-components"; | ||
|
||
export const BigInput = styled.input` | ||
width: 100%; | ||
height: 54px; | ||
border-radius: 200px; | ||
padding: 8px 24px; | ||
font-size: 16px; | ||
font-weight: 400; | ||
border: 1px solid rgba(var(--white-rgb), 0.3); | ||
background: white; | ||
color: var(--text-tertiary); | ||
box-shadow: 0px 1px 2px 0px #0000000d; | ||
|
||
&::placeholder { | ||
color: var(--white-rgb); | ||
} | ||
|
||
&:disabled { | ||
user-select: none; | ||
pointer-events: none; | ||
background: rgba(0, 0, 0, 0.05); | ||
} | ||
`; | ||
|
||
interface EmailCodeInputProps extends InputHTMLAttributes<HTMLInputElement> { | ||
ref?: Ref<HTMLInputElement>; | ||
} | ||
|
||
export const ConfirmationCodeInput = ( | ||
inputProps: EmailCodeInputProps | ||
): JSX.Element => { | ||
return ( | ||
<BigInput | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. curious whether this opens up the digit input UI on mobile There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
type="text" | ||
inputMode="numeric" | ||
pattern="[0-9]*" | ||
{...inputProps} | ||
/> | ||
); | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
|
||
const TypographyText = styled.span` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. slightly unclear what this is for - typography is very vague as a name. are you just trying out the font here? if so that's fine but leave a comment There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not only, but also define a set of sizes and styles for our texts, |
||
font-family: "Barlow", sans-serif; | ||
color: rgba(0, 0, 0, 1); | ||
`; | ||
interface TypographyProps { | ||
children?: React.ReactNode; | ||
} | ||
export const Typography: React.FC<TypographyProps> = ({ | ||
children | ||
}): JSX.Element => { | ||
return <TypographyText>{children}</TypographyText>; | ||
}; |
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -63,6 +63,7 @@ import { loadInitialState } from "../src/loadInitialState"; | |||||||||
import { registerServiceWorker } from "../src/registerServiceWorker"; | ||||||||||
import { AppState, StateEmitter } from "../src/state"; | ||||||||||
import { useZappServer } from "../src/zapp/useZappServer"; | ||||||||||
import ComponentsScreen from "../new-components/ComponentsScreen"; | ||||||||||
|
||||||||||
function App(): JSX.Element { | ||||||||||
useBackgroundJobs(); | ||||||||||
|
@@ -129,6 +130,10 @@ function RouterImpl(): JSX.Element { | |||||||||
<Route path="terms" element={<TermsScreen />} /> | ||||||||||
<Route index element={<HomeScreen />} /> | ||||||||||
<Route path="login" element={<LoginScreen />} /> | ||||||||||
|
||||||||||
{appConfig.devMode && ( | ||||||||||
<Route path="components" element={<ComponentsScreen />} /> | ||||||||||
)} | ||||||||||
ororsatti marked this conversation as resolved.
Show resolved
Hide resolved
Comment on lines
+138
to
+140
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
<Route | ||||||||||
path="login-interstitial" | ||||||||||
element={<LoginInterstitialScreen />} | ||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for reimplementations of existing components, i would prefer their names to not overlap with the existing components, so as to not hinder development on existing UIs. Something like
BigInput2
would work for me