Merge pull request #24 from TeamBNBN/fe/infoEditForm

[Front-end] feat: 내 정보 변경폼 추가
This commit is contained in:
FlashingFuture 2024-07-16 17:24:55 +09:00 committed by GitHub
commit 257a18652d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 103 additions and 0 deletions

View File

@ -0,0 +1,48 @@
import styles from './InfoEditForm.module.css';
import { useState } from 'react';
export default function InfoEditForm() {
const [username, setUsername] = useState('');
const [useremail, setUseremail] = useState('');
return (
<form className={styles.infoEditForm}>
<p className={styles.textHeading}>이름 변경</p>
<div className={styles.inputBox}>
<label
htmlFor="username"
className={styles.textBody}
>
강의에서 사용할 이름을 입력하세요
</label>
<input
placeholder="이름"
type="text"
id="username"
className={`${styles.input} ${styles.textBody}`}
value={username}
onChange={(e) => setUsername(e.target.value)}
required
/>
</div>
<p className={styles.textHeading}>이메일 변경</p>
<div className={styles.inputBox}>
<label
htmlFor="useremail"
className={styles.textBody}
>
이메일을 입력하세요.
</label>
<input
placeholder="이메일"
type="text"
id="useremail"
className={`${styles.input} ${styles.textBody}`}
value={useremail}
onChange={(e) => setUseremail(e.target.value)}
required
/>
</div>
<button className={styles.buttonBox}> 정보 수정</button>
</form>
);
}

View File

@ -0,0 +1,54 @@
.textHeading {
font-size: 24px;
line-height: 1.2;
font-weight: 700;
margin: 0px;
}
.textBody {
font-size: 16px;
line-height: 1.4;
font-weight: 400;
color: var(--text-color-secondary);
}
.textBodyStrong {
font-size: 16px;
line-height: 1.4;
font-weight: 700;
}
.infoEditForm {
display: flex;
flex-direction: column;
gap: 20px;
width: 900px;
}
.inputBox {
display: flex;
flex-direction: column;
gap: 8px;
}
.input {
border-radius: 8px;
border: 1px solid var(--border-color);
box-sizing: border-box;
padding: 12px 16px;
}
.buttonBox {
padding: 12px;
background-color: var(--primary-color);
border: 1px solid var(--border-color);
color: white;
box-sizing: border-box;
border-radius: 8px;
align-self: end;
}
.buttonCover {
display: flex;
justify-content: end;
}

View File

@ -0,0 +1 @@
export { default as InfoEditForm } from './InfoEditForm';