From 85025a88633255d66a5664ef0124143df75fe691 Mon Sep 17 00:00:00 2001 From: GuRaBang Date: Tue, 18 Oct 2022 22:46:32 +0900 Subject: [PATCH 1/4] =?UTF-8?q?style:=20=EB=A1=9C=EA=B7=B8=EC=9D=B8,=20?= =?UTF-8?q?=ED=9A=8C=EC=9B=90=EA=B0=80=EC=9E=85=20=EC=8A=A4=ED=83=80?= =?UTF-8?q?=EC=9D=BC=20=EA=B5=AC=ED=98=84=20=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: jiseung Co-authored-by: johan --- src/pages/SignIn/components/SigninForm.js | 9 ++++- src/pages/SignIn/index.js | 17 +++++++-- src/shared/components/SchemeInput.js | 42 ++++++++++++++++++----- 3 files changed, 57 insertions(+), 11 deletions(-) diff --git a/src/pages/SignIn/components/SigninForm.js b/src/pages/SignIn/components/SigninForm.js index 2ad1a8d..a54e3ef 100644 --- a/src/pages/SignIn/components/SigninForm.js +++ b/src/pages/SignIn/components/SigninForm.js @@ -4,6 +4,7 @@ import { SigninScheme } from '../../../shared/scheme/scheme.js'; import styled from '../../../library/styled.js'; import { requestSignIn } from '../../../shared/store/userInfo.js'; import { router } from '../../../shared/router/index.js'; +import theme from '../../../shared/styles/theme.js'; const styles = { submitBtn: { @@ -17,6 +18,12 @@ const styles = { color: 'grey', }), }, + errorMsg: styled({ + height: '20px', + font: theme['font-kr-regular'], + color: theme['orange-color'], + 'font-size': '14px', + }), }; class SigninForm extends Component { @@ -38,7 +45,7 @@ class SigninForm extends Component { ${Object.values(this.signinScheme) .map(scheme => new SchemeInput({ scheme, onInput: this.onInput.bind(this) }).render()) .join('')} -
${errorMsg ?? ''}
+
${errorMsg ?? ''}
`; } diff --git a/src/pages/SignIn/index.js b/src/pages/SignIn/index.js index d189718..c817315 100644 --- a/src/pages/SignIn/index.js +++ b/src/pages/SignIn/index.js @@ -2,17 +2,30 @@ import Component from '../../library/Component.js'; import { Header } from '../../shared/components/index.js'; import { router } from '../../shared/router/index.js'; import { SigninForm } from './components/index.js'; +import styled from '../../library/styled.js'; +import theme from '../../shared/styles/theme.js'; +const styles = { + title: styled({ + 'text-align': 'center', + width: '100%', + font: theme['font-en-bold'], + 'font-size': '47px', + }), + link: styled({ + color: theme['orange-color'], + }), +}; class SignIn extends Component { domStr() { return `
${new Header().render()} -

AllSol

+

AllSol

${new SigninForm().render()}
Don't have an account? - +
`; diff --git a/src/shared/components/SchemeInput.js b/src/shared/components/SchemeInput.js index 7571190..a2a71a5 100644 --- a/src/shared/components/SchemeInput.js +++ b/src/shared/components/SchemeInput.js @@ -1,5 +1,6 @@ import Component from '../../library/Component.js'; import styled from '../../library/styled.js'; +import theme from '../styles/theme.js'; const styles = { container: styled({ @@ -7,11 +8,37 @@ const styles = { 'flex-direction': 'column', 'align-items': 'flex-start', gap: '0.5rem', - margin: '3rem 4rem', + margin: '1rem 4rem', }), - - input: styled({ - width: '100%', + label: styled({ + font: theme['font-en-bold'], + 'font-size': '15px', + }), + input: { + valid: styled({ + width: '100%', + height: '43px', + border: `solid 1px ${theme['lightgray-color']}`, + 'border-radius': '6px', + 'padding-left': '8px', + font: theme['font-kr-regular'], + 'font-size': '16px', + }), + invalid: styled({ + width: '100%', + height: '43px', + border: `solid 1px ${theme['orange-color']}`, + 'border-radius': '6px', + 'padding-left': '8px', + font: theme['font-kr-regular'], + 'font-size': '16px', + }), + }, + errorMsg: styled({ + height: '20px', + font: theme['font-kr-regular'], + color: theme['orange-color'], + 'font-size': '14px', }), }; @@ -21,16 +48,15 @@ class SchemeInput extends Component { // prettier-ignore return `
- - ${label} + -
${valid ? '' : errorMsg ?? ''}
+
${valid ? '' : errorMsg ?? ''}
`; } From 06dd4adc596c13bf7022d87ff4c1f1176544f0b4 Mon Sep 17 00:00:00 2001 From: GuRaBang Date: Wed, 19 Oct 2022 02:32:22 +0900 Subject: [PATCH 2/4] =?UTF-8?q?fix:=20=EB=A1=9C=EA=B7=B8=EC=9D=B8,=20?= =?UTF-8?q?=ED=9A=8C=EC=9B=90=EA=B0=80=EC=9E=85=20=ED=8F=BC=20=EB=8F=99?= =?UTF-8?q?=EC=9E=91=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/SignIn/components/SigninForm.js | 3 +-- src/pages/SignUp/components/SignupForm.js | 7 ++++--- src/shared/components/SchemeInput.js | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pages/SignIn/components/SigninForm.js b/src/pages/SignIn/components/SigninForm.js index a54e3ef..a26da7c 100644 --- a/src/pages/SignIn/components/SigninForm.js +++ b/src/pages/SignIn/components/SigninForm.js @@ -35,10 +35,9 @@ class SigninForm extends Component { domStr() { const { userid, password, errorMsg } = this.state; - const { isValid } = this.signinScheme; - this.signinScheme.userid.value = userid; this.signinScheme.password.value = password; + const { isValid } = this.signinScheme; return `