From cba10f8d6413259146c4a086e6606f3e6b0d9938 Mon Sep 17 00:00:00 2001 From: Roland Osborne Date: Wed, 16 Mar 2022 11:05:05 -0700 Subject: [PATCH] breaking out style for create --- net/web/src/Create/Create.jsx | 29 ++++++++------ net/web/src/Create/Create.styled.js | 61 +++++++++++++++++++++++++++++ net/web/src/Login/Login.jsx | 1 - 3 files changed, 79 insertions(+), 12 deletions(-) create mode 100644 net/web/src/Create/Create.styled.js diff --git a/net/web/src/Create/Create.jsx b/net/web/src/Create/Create.jsx index 3e985b31..70e638bd 100644 --- a/net/web/src/Create/Create.jsx +++ b/net/web/src/Create/Create.jsx @@ -3,23 +3,30 @@ import { AppContext } from '../AppContext/AppContext'; import { Input, Button } from 'antd'; import { UserOutlined, LockOutlined } from '@ant-design/icons'; import { useCreate } from './useCreate.hook'; +import { CreateWrapper, CreateInput, CreatePassword, CreateLogin, CreateEnter } from './Create.styled'; export function Create() { const { state, actions } = useCreate() return ( -
-
-
indicom
-
- Communication for the Decentralized Web + +
+
indicom
+
+ Communication for the Decentralized Web
- actions.setUsername(e.target.value)} value={state.username} placeholder="username" prefix={} style={{ marginTop: '16px' }} /> - actions.setPassword(e.target.value)} value={state.password} placeholder="password" prefix={} style={{ marginTop: '16px' }} /> - actions.setConfirmed(e.target.value)} value={state.confirmed} placeholder="password" prefix={} style={{ marginTop: '16px' }} /> - + } + onChange={(e) => actions.setUsername(e.target.value)} value={state.username} + addonAfter={state.conflict} /> + } + onChange={(e) => actions.setPassword(e.target.value)} value={state.password} /> + } + onChange={(e) => actions.setConfirmed(e.target.value)} value={state.confirmed} /> + actions.onCreate()} disabled={actions.isDisabled()}> + Create Account +
- -
+ actions.onLogin()}>Account Sign In + ) } diff --git a/net/web/src/Create/Create.styled.js b/net/web/src/Create/Create.styled.js new file mode 100644 index 00000000..d8da4af3 --- /dev/null +++ b/net/web/src/Create/Create.styled.js @@ -0,0 +1,61 @@ +import { Input, Button } from 'antd'; +import styled from 'styled-components'; + +export const CreateWrapper = styled.div` + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + width: 100%; + + .container { + background-color: #ffffff; + display: flex; + flex-direction: column; + padding: 16px; + border-radius: 4px; + max-width: 500px; + width: 50%; + } + + .header { + text-align: center; + font-size: 2em; + font-weight: bold; + color: #555555 + } + + .subheader { + font-size: 0.8em; + display: flex; + border-bottom: 1px solid black; + color: #444444 + padding-left: 16px + padding-right: 16px; + } + + .subheader-text { + text-align: center; + width: 100%; + } + +`; + +export const CreateInput = styled(Input)` + margin-top: 16px; +`; + +export const CreatePassword = styled(Input.Password)` + margin-top: 16px; +`; + +export const CreateEnter = styled(Button)` + align-self: center; + margin-top: 16px; + min-width: 128px; + width: 33%; +`; + +export const CreateLogin = styled(Button)` + margin-top: 4px; +`; diff --git a/net/web/src/Login/Login.jsx b/net/web/src/Login/Login.jsx index 2be413eb..637c9bd8 100644 --- a/net/web/src/Login/Login.jsx +++ b/net/web/src/Login/Login.jsx @@ -6,7 +6,6 @@ import { useLogin } from './useLogin.hook'; import { LoginWrapper, LoginInput, LoginPassword, LoginCreate, LoginEnter } from './Login.styled'; export function Login(props) { -console.log(props) const { state, actions } = useLogin()