Skip to content

Commit 4f351e8

Browse files
author
Harika
committed
Migration Harika lbdashboard/register css to module css
1 parent 0d817a5 commit 4f351e8

2 files changed

Lines changed: 29 additions & 27 deletions

File tree

src/components/LBDashboard/Register/LBRegister.jsx

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { useState } from 'react';
22
import axios from 'axios';
33
import { toast } from 'react-toastify';
44
import { ENDPOINTS } from '../../../utils/URL';
5-
import './LBRegister.css';
5+
import styles from './LBRegister.module.css';
66
import logo from '../../../assets/images/logo2.png';
77

88
function LBRegister() {
@@ -64,21 +64,21 @@ function LBRegister() {
6464
};
6565

6666
return (
67-
<div className="lb-register-page">
68-
<div className="lb-register-logo">
67+
<div className={`${styles.lbRegisterPage}`}>
68+
<div className={`${styles.lbRegisterLogo}`}>
6969
<img src={logo} alt="One Community Logo" />
7070
</div>
71-
<div className="lb-register-container">
72-
<div className="lb-register-top" />
73-
<div className="lb-register-main">
71+
<div className={`${styles.lbRegisterContainer}`}>
72+
<div className={`${styles.lbRegisterTop}`} />
73+
<div className={`${styles.lbRegisterMain}`}>
7474
<h2>Registration Page</h2>
7575
<p>
7676
Filling the details below will allow you to bid or rent a unit from a village of your
7777
choice in our property. Clicking the submit button will confirm all your details with us
7878
and will take you to our login page.
7979
</p>
80-
<div className="lb-register-form-wrapper">
81-
<form className="lb-register-form" onSubmit={handleSubmit}>
80+
<div className={`${styles.lbRegisterFormWrapper}`}>
81+
<form className={`${styles.lbRegisterForm}`} onSubmit={handleSubmit}>
8282
<input
8383
type="text"
8484
name="firstName"
@@ -87,7 +87,9 @@ function LBRegister() {
8787
onChange={handleChange}
8888
required
8989
/>
90-
{errors.firstName && <p className="lb-register-error">{errors.firstName}</p>}
90+
{errors.firstName && (
91+
<p className={`${styles.lbRegisterError}`}>{errors.firstName}</p>
92+
)}
9193

9294
<input
9395
type="text"
@@ -97,7 +99,7 @@ function LBRegister() {
9799
onChange={handleChange}
98100
required
99101
/>
100-
{errors.lastName && <p className="lb-register-error">{errors.lastName}</p>}
102+
{errors.lastName && <p className={`${styles.lbRegisterError}`}>{errors.lastName}</p>}
101103

102104
<input
103105
type="email"
@@ -107,7 +109,7 @@ function LBRegister() {
107109
onChange={handleChange}
108110
required
109111
/>
110-
{errors.email && <p className="lb-register-error">{errors.email}</p>}
112+
{errors.email && <p className={`${styles.lbRegisterError}`}>{errors.email}</p>}
111113

112114
<input
113115
type="text"
@@ -117,7 +119,7 @@ function LBRegister() {
117119
onChange={handleChange}
118120
required
119121
/>
120-
{errors.phone && <p className="lb-register-error">{errors.phone}</p>}
122+
{errors.phone && <p className={`${styles.lbRegisterError}`}>{errors.phone}</p>}
121123

122124
<input
123125
type="password"
@@ -127,7 +129,7 @@ function LBRegister() {
127129
onChange={handleChange}
128130
required
129131
/>
130-
{errors.password && <p className="lb-register-error">{errors.password}</p>}
132+
{errors.password && <p className={`${styles.lbRegisterError}`}>{errors.password}</p>}
131133

132134
<button type="submit">Click to Register</button>
133135
</form>

src/components/LBDashboard/Register/LBRegister.css renamed to src/components/LBDashboard/Register/LBRegister.module.css

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.lb-register-page {
1+
.lbRegisterPage {
22
display: flex;
33
flex-direction: column;
44
align-items: center;
@@ -9,26 +9,26 @@
99
overflow: hidden;
1010
}
1111

12-
.lb-register-logo {
12+
.lbRegisterLogo {
1313
text-align: center;
1414
margin-bottom: 20px;
1515
}
1616

17-
.lb-register-logo img {
17+
.lbRegisterLogo img {
1818
max-width: 30%;
1919
height: auto;
2020
min-width: 250px;
2121
}
2222

23-
.lb-register-container {
23+
.lbRegisterContainer {
2424
background-color: white;
2525
border: 1px solid #ccc;
2626
border-radius: 8px;
2727
width: 66%;
2828
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
2929
}
3030

31-
.lb-register-top {
31+
.lbRegisterTop {
3232
display: flex;
3333
justify-content: space-between;
3434
align-items: center;
@@ -37,7 +37,7 @@
3737
background-color: #9dd425;
3838
}
3939

40-
.lb-register-main {
40+
.lbRegisterMain {
4141
background-color: #e0e0e0;
4242
display: flex;
4343
flex-direction: column;
@@ -48,41 +48,41 @@
4848
min-height: 560px;
4949
}
5050

51-
.lb-register-main h2 {
51+
.lbRegisterMain h2 {
5252
font-size: 28px;
5353
text-align: center;
5454
margin-bottom: 30px;
5555
color: #202020;
5656
}
5757

58-
.lb-register-main > p {
58+
.lbRegisterMain > p {
5959
font-weight: 500;
6060
font-size: 14px;
6161
text-align: left;
6262
color: #202020;
6363
margin: 0 10% 40px 10%;
6464
}
6565

66-
.lb-register-form-wrapper {
66+
.lbRegisterFormWrapper {
6767
width: 40%;
6868
min-width: 140px;
6969
}
7070

71-
.lb-register-form {
71+
.lbRegisterForm {
7272
display: flex;
7373
flex-direction: column;
7474
width: 100%;
7575
}
7676

77-
.lb-register-form input {
77+
.lbRegisterForm input {
7878
margin-bottom: 15px;
7979
padding: 5px 10px;
8080
border: 1px solid #ccc;
8181
border-radius: 4px;
8282
font-size: 14px;
8383
}
8484

85-
.lb-register-form button {
85+
.lbRegisterForm button {
8686
margin-top: 10px;
8787
margin-left: auto;
8888
width: 40%;
@@ -97,11 +97,11 @@
9797
cursor: pointer;
9898
}
9999

100-
.lb-register-form button:hover {
100+
.lbRegisterForm button:hover {
101101
background-color: #218838;
102102
}
103103

104-
.lb-register-error {
104+
.lbRegisterError {
105105
color: red;
106106
font-size: 12px;
107107
margin-top: -10px;

0 commit comments

Comments
 (0)