From 52ab434740bbac85fdea4410ec89ea6e007b5f81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bel=C3=A9n=20Curcio?= Date: Thu, 9 Aug 2018 12:01:27 -0300 Subject: [PATCH] Adding SignIn View --- src/core/client/auth/components/App.tsx | 4 + src/core/client/auth/components/SignIn.css | 7 ++ src/core/client/auth/components/SignIn.tsx | 58 ++++++-------- src/core/client/auth/components/SignUp.css | 3 + src/core/client/auth/components/SignUp.tsx | 53 +++++++++++++ .../auth/containers/SignUpContainer.tsx | 10 +++ .../stream/containers/UserBoxContainer.tsx | 2 +- .../ui/components/FormField/FormField.mdx | 36 +++++++++ src/docs/forms.mdx | 79 +++++++++++++------ 9 files changed, 193 insertions(+), 59 deletions(-) create mode 100644 src/core/client/auth/components/SignIn.css create mode 100644 src/core/client/auth/components/SignUp.css create mode 100644 src/core/client/auth/components/SignUp.tsx create mode 100644 src/core/client/auth/containers/SignUpContainer.tsx create mode 100644 src/core/client/ui/components/FormField/FormField.mdx diff --git a/src/core/client/auth/components/App.tsx b/src/core/client/auth/components/App.tsx index 7bb681497..7de209ae6 100644 --- a/src/core/client/auth/components/App.tsx +++ b/src/core/client/auth/components/App.tsx @@ -1,6 +1,8 @@ import * as React from "react"; import { StatelessComponent } from "react"; + import SignInContainer from "../containers/SignInContainer"; +import SignUpContainer from "../containers/SignUpContainer"; export interface AppProps { // TODO: (cvle) Remove %future added value when we have Relay 1.6 @@ -10,6 +12,8 @@ export interface AppProps { const App: StatelessComponent = ({ view }) => { switch (view) { + case "SIGN_UP": + return ; case "SIGN_IN": return ; default: diff --git a/src/core/client/auth/components/SignIn.css b/src/core/client/auth/components/SignIn.css new file mode 100644 index 000000000..9aff9cb83 --- /dev/null +++ b/src/core/client/auth/components/SignIn.css @@ -0,0 +1,7 @@ +.root { + width: 330px; +} + +.forgotPassword { + text-align: right; +} diff --git a/src/core/client/auth/components/SignIn.tsx b/src/core/client/auth/components/SignIn.tsx index f5f350e2b..97dfdb477 100644 --- a/src/core/client/auth/components/SignIn.tsx +++ b/src/core/client/auth/components/SignIn.tsx @@ -1,5 +1,6 @@ import * as React from "react"; import { StatelessComponent } from "react"; +import * as styles from "./SignIn.css"; import { Button, @@ -12,39 +13,30 @@ import { const SignIn: StatelessComponent = props => { return ( - - - - Sign up to join the conversation - - - - Email Address - - - - - Username - - A unique identifier displayed on your comments. You may use “_” and - “.” - - - - - - Password - Must be at least 8 characters - - - - - Confirm Password - - - - + + + + + Sign up and join the conversation + diff --git a/src/core/client/auth/components/SignUp.css b/src/core/client/auth/components/SignUp.css new file mode 100644 index 000000000..667e35b7a --- /dev/null +++ b/src/core/client/auth/components/SignUp.css @@ -0,0 +1,3 @@ +.root { + width: 330px; +} diff --git a/src/core/client/auth/components/SignUp.tsx b/src/core/client/auth/components/SignUp.tsx new file mode 100644 index 000000000..73a01ec63 --- /dev/null +++ b/src/core/client/auth/components/SignUp.tsx @@ -0,0 +1,53 @@ +import * as React from "react"; +import { StatelessComponent } from "react"; +import * as styles from "./SignIn.css"; + +import { + Button, + Flex, + FormField, + InputLabel, + TextField, + Typography, +} from "talk-ui/components"; + +const SignUp: StatelessComponent = props => { + return ( + + + Sign up to join the conversation + + + + Email Address + + + + + Username + + A unique identifier displayed on your comments. You may use “_” and + “.” + + + + + + Password + Must be at least 8 characters + + + + + Confirm Password + + + + + + ); +}; + +export default SignUp; diff --git a/src/core/client/auth/containers/SignUpContainer.tsx b/src/core/client/auth/containers/SignUpContainer.tsx new file mode 100644 index 000000000..9db82383a --- /dev/null +++ b/src/core/client/auth/containers/SignUpContainer.tsx @@ -0,0 +1,10 @@ +import * as React from "react"; +import { StatelessComponent } from "react"; + +import SignUp from "../components/SignUp"; + +const SignUpContainer: StatelessComponent = () => { + return ; +}; + +export default SignUpContainer; diff --git a/src/core/client/stream/containers/UserBoxContainer.tsx b/src/core/client/stream/containers/UserBoxContainer.tsx index 359c93d97..176a28eea 100644 --- a/src/core/client/stream/containers/UserBoxContainer.tsx +++ b/src/core/client/stream/containers/UserBoxContainer.tsx @@ -37,7 +37,7 @@ export class UserBoxContainer extends Component { + + + + +## Align items + + + + + + + + +## Direction + + + + + + + diff --git a/src/docs/forms.mdx b/src/docs/forms.mdx index 5667d6f78..b114cf7e1 100644 --- a/src/docs/forms.mdx +++ b/src/docs/forms.mdx @@ -16,37 +16,66 @@ import { InputLabel, ValidationMessage, TextField, Typography, Flex, Button} fro ## Simple Form - + Sign up to join the conversation - Email Address - - Username - A unique identifier displayed on your comments. You may use “_” and “.” - - Password - Must be at least 8 characters - - Confirm Password - - + + + Email Address + + + + + Username + A unique identifier displayed on your comments. You may use “_” and “.” + + + + + + Password + Must be at least 8 characters + + + + + Confirm Password + + + + ## Simple Form with error + - + Sign up to join the conversation - Email Address - - Username - A unique identifier displayed on your comments. You may use “_” and “.” - - Invalid characters. Try again. - Password - Must be at least 8 characters - - Confirm Password - - + + + Email Address + + + + + Username + A unique identifier displayed on your comments. You may use “_” and “.” + + Invalid characters. Try again. + + + + + Password + Must be at least 8 characters + + + + + Confirm Password + + + +