Compare commits
14 commits
295c36f6e6
...
2d646d773f
Author | SHA1 | Date | |
---|---|---|---|
2d646d773f | |||
2fed76b5b7 | |||
fd50cf9f75 | |||
21b21c9c78 | |||
d3865605c4 | |||
8ad493f96e | |||
3f8dd2ac3f | |||
1bc17581ec | |||
21834d83db | |||
5ce5ebb3b6 | |||
2249424b2e | |||
bc59e78bd5 | |||
aebf89a83e | |||
398c1f7abb |
3 changed files with 16 additions and 15 deletions
|
@ -6,15 +6,15 @@ export default function LabeledInput({
|
||||||
label,
|
label,
|
||||||
placeholder,
|
placeholder,
|
||||||
value,
|
value,
|
||||||
|
name,
|
||||||
...props
|
...props
|
||||||
}: {
|
}: {
|
||||||
type: 'text' | 'email' | 'password';
|
type: 'text' | 'email' | 'password';
|
||||||
label: string;
|
label: string;
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
|
name: string;
|
||||||
value?: string;
|
value?: string;
|
||||||
} & React.InputHTMLAttributes<HTMLInputElement>) {
|
} & React.InputHTMLAttributes<HTMLInputElement>) {
|
||||||
const elementId = Math.random().toString(36).substring(2, 15);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='flex flex-col gap-1'>
|
<div className='flex flex-col gap-1'>
|
||||||
<Label htmlFor={name}>{label}</Label>
|
<Label htmlFor={name}>{label}</Label>
|
||||||
|
@ -23,7 +23,8 @@ export default function LabeledInput({
|
||||||
type={type}
|
type={type}
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
defaultValue={value}
|
defaultValue={value}
|
||||||
id={elementId}
|
id={name}
|
||||||
|
name={name}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -25,15 +25,15 @@ export default function LoginForm() {
|
||||||
>
|
>
|
||||||
<LabeledInput
|
<LabeledInput
|
||||||
type='email'
|
type='email'
|
||||||
label='E-Mail'
|
label='E-Mail or Username'
|
||||||
placeholder='Enter your E-Mail'
|
placeholder='What you are known as.'
|
||||||
name='email'
|
name='email'
|
||||||
data-cy='email-input'
|
data-cy='email-input'
|
||||||
/>
|
/>
|
||||||
<LabeledInput
|
<LabeledInput
|
||||||
type='password'
|
type='password'
|
||||||
label='Password'
|
label='Password'
|
||||||
placeholder='Enter your Password'
|
placeholder="Let's hope you remember it."
|
||||||
name='password'
|
name='password'
|
||||||
data-cy='password-input'
|
data-cy='password-input'
|
||||||
/>
|
/>
|
||||||
|
|
18
yarn.lock
18
yarn.lock
|
@ -2686,9 +2686,9 @@ __metadata:
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"caniuse-lite@npm:^1.0.30001579":
|
"caniuse-lite@npm:^1.0.30001579":
|
||||||
version: 1.0.30001717
|
version: 1.0.30001718
|
||||||
resolution: "caniuse-lite@npm:1.0.30001717"
|
resolution: "caniuse-lite@npm:1.0.30001718"
|
||||||
checksum: 10c0/6c0bb1e5182fd578ebe97ee2203250849754a4e17d985839fab527ad27e125a4c4ffce3ece5505217fedf30ea0bbc17ac9f93e9ac525c0389ccba61c6e8345dc
|
checksum: 10c0/67f9ad09bc16443e28d14f265d6e468480cd8dc1900d0d8b982222de80c699c4f2306599c3da8a3fa7139f110d4b30d49dbac78f215470f479abb6ffe141d5d3
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
@ -3047,14 +3047,14 @@ __metadata:
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"debug@npm:4, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:^4.3.5, debug@npm:^4.4.0":
|
"debug@npm:4, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4, debug@npm:^4.3.5, debug@npm:^4.4.0":
|
||||||
version: 4.4.0
|
version: 4.4.1
|
||||||
resolution: "debug@npm:4.4.0"
|
resolution: "debug@npm:4.4.1"
|
||||||
dependencies:
|
dependencies:
|
||||||
ms: "npm:^2.1.3"
|
ms: "npm:^2.1.3"
|
||||||
peerDependenciesMeta:
|
peerDependenciesMeta:
|
||||||
supports-color:
|
supports-color:
|
||||||
optional: true
|
optional: true
|
||||||
checksum: 10c0/db94f1a182bf886f57b4755f85b3a74c39b5114b9377b7ab375dc2cfa3454f09490cc6c30f829df3fc8042bc8b8995f6567ce5cd96f3bc3688bd24027197d9de
|
checksum: 10c0/d2b44bc1afd912b49bb7ebb0d50a860dc93a4dd7d946e8de94abc957bb63726b7dd5aa48c18c2386c379ec024c46692e15ed3ed97d481729f929201e671fcd55
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
@ -5617,11 +5617,11 @@ __metadata:
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"napi-postinstall@npm:^0.2.2":
|
"napi-postinstall@npm:^0.2.2":
|
||||||
version: 0.2.3
|
version: 0.2.4
|
||||||
resolution: "napi-postinstall@npm:0.2.3"
|
resolution: "napi-postinstall@npm:0.2.4"
|
||||||
bin:
|
bin:
|
||||||
napi-postinstall: lib/cli.js
|
napi-postinstall: lib/cli.js
|
||||||
checksum: 10c0/125cb677d59f284e61cd9b4cd840cf735edd4c325ffc54af4fad16c8726642ffeddaa63c5ca3533b5e7023be4d8e9ff223484c5eea2a8efe2e2498fd063cabbd
|
checksum: 10c0/e8c357d7e27848c4af7becf2796afff245a2fc8ba176e1b133410bb1c9934a66d4bc542d0c9f04c73b0ba34ee0486b30b6cd1c62ed3aa36797d394200c9a2a8b
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue