Added label for forms

This commit is contained in:
2026-03-13 09:21:27 +08:00
parent bd20f5a5cf
commit 4478a74ece
4 changed files with 36 additions and 17 deletions

View File

@@ -50,6 +50,8 @@ const ViewUserPage = () => {
{/* Input fields */} {/* Input fields */}
<form className={editUserStyle.fields}> <form className={editUserStyle.fields}>
{/* Role and Dropdown */} {/* Role and Dropdown */}
<div className={editUserStyle.roleField}>
<p>Role</p>
<SelectField <SelectField
label="Select Role" label="Select Role"
options={[ options={[
@@ -58,6 +60,7 @@ const ViewUserPage = () => {
{ label: "Option 2", value: "Option 2" }, { label: "Option 2", value: "Option 2" },
]} ]}
/> />
</div>
{/* Email */} {/* Email */}
<div className={editUserStyle.inputMainContainer}> <div className={editUserStyle.inputMainContainer}>
<div className={editUserStyle.inputContainer}> <div className={editUserStyle.inputContainer}>

View File

@@ -99,7 +99,13 @@
font-weight: 400; font-weight: 400;
line-height: normal; line-height: normal;
} }
.roleField {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 10px;
align-self: stretch;
}
.inputField { .inputField {
display: flex; display: flex;
flex-direction: column; flex-direction: column;

View File

@@ -54,6 +54,8 @@ const AddUserPage = () => {
onSubmit={handleSubmit(onSubmit)} onSubmit={handleSubmit(onSubmit)}
> >
{/* Role and Dropdown */} {/* Role and Dropdown */}
<div className={addUserStyle.roleField}>
<p>Role</p>
<SelectField <SelectField
label="Select Role" label="Select Role"
options={[ options={[
@@ -62,6 +64,7 @@ const AddUserPage = () => {
{ label: "Option 2", value: "Option 2" }, { label: "Option 2", value: "Option 2" },
]} ]}
/> />
</div>
{/* Email */} {/* Email */}
<div className={addUserStyle.inputMainContainer}> <div className={addUserStyle.inputMainContainer}>
<div className={addUserStyle.inputContainer}> <div className={addUserStyle.inputContainer}>

View File

@@ -86,6 +86,13 @@
font-weight: 400; font-weight: 400;
line-height: normal; line-height: normal;
} }
.roleField {
display: flex;
flex-direction: column;
align-items: flex-start;
gap: 10px;
align-self: stretch;
}
.inputField { .inputField {
display: flex; display: flex;
flex-direction: column; flex-direction: column;