[Front-end] feat: 내 정보 변경폼 추가
This commit is contained in:
parent
a1a591cc37
commit
594a96d853
48
frontend/src/components/InfoEditForm/InfoEditForm.jsx
Normal file
48
frontend/src/components/InfoEditForm/InfoEditForm.jsx
Normal 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>
|
||||
);
|
||||
}
|
54
frontend/src/components/InfoEditForm/InfoEditForm.module.css
Normal file
54
frontend/src/components/InfoEditForm/InfoEditForm.module.css
Normal 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;
|
||||
}
|
1
frontend/src/components/InfoEditForm/index.js
Normal file
1
frontend/src/components/InfoEditForm/index.js
Normal file
@ -0,0 +1 @@
|
||||
export { default as InfoEditForm } from './InfoEditForm';
|
Loading…
Reference in New Issue
Block a user