moar red
This commit is contained in:
parent
a8d9144cf5
commit
6cb99576c0
@ -42,6 +42,9 @@ function Register(args) {
|
|||||||
submitRegister(name, password);
|
submitRegister(name, password);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const pwLen = () =>
|
||||||
|
!password || password && password.length > 3;
|
||||||
|
|
||||||
const registerConfirm = () =>
|
const registerConfirm = () =>
|
||||||
password === confirm;
|
password === confirm;
|
||||||
|
|
||||||
@ -51,24 +54,30 @@ function Register(args) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div class="login">
|
<div class="login">
|
||||||
<label for="username">Username</label>
|
<label class="login-input" for="username">Username </label>
|
||||||
<input
|
<input
|
||||||
class="login-input"
|
class="login-input"
|
||||||
type="email"
|
type="text"
|
||||||
placeholder="username"
|
placeholder="username"
|
||||||
value={this.state.name}
|
value={this.state.name}
|
||||||
onInput={linkState(this, 'name')}
|
onInput={linkState(this, 'name')}
|
||||||
/>
|
/>
|
||||||
<label for="password">Password - min 4 chars</label>
|
<label
|
||||||
|
class={`${pwLen() ? '' : 'red'} login-input`}
|
||||||
|
for="password">Password - min 4 chars
|
||||||
|
</label>
|
||||||
<input
|
<input
|
||||||
class="login-input"
|
class={`${pwLen() ? '' : 'red'} login-input`}
|
||||||
type="password"
|
type="password"
|
||||||
placeholder="password"
|
placeholder="password"
|
||||||
autocomplete="new-password"
|
autocomplete="new-password"
|
||||||
value={this.state.password}
|
value={this.state.password}
|
||||||
onInput={linkState(this, 'password')}
|
onInput={linkState(this, 'password')}
|
||||||
/>
|
/>
|
||||||
<label for="confirm">Confirm Password</label>
|
<label
|
||||||
|
class={`${registerConfirm() ? '' : 'red'} login-input`}
|
||||||
|
for="confirm">Confirm Password
|
||||||
|
</label>
|
||||||
<input
|
<input
|
||||||
class={`${registerConfirm() ? '' : 'red'} login-input`}
|
class={`${registerConfirm() ? '' : 'red'} login-input`}
|
||||||
type="password"
|
type="password"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user