Skip to content

Commit 1bb2249

Browse files
authored
Fix vertical styling in Register component (#25)
- Disable left and right button at start and end. * Center align register page heading
1 parent edb66db commit 1bb2249

File tree

4 files changed

+37
-7
lines changed

4 files changed

+37
-7
lines changed

src/app/components/Authentication/Register.tsx

+10-2
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,11 @@ export class Register extends React.Component<RegisterInterfaces.Props, Register
436436
</div>
437437
<Row>
438438
<div
439-
className={classnames(authStyles['left-arrow'])}
439+
className={
440+
currentStep === RegisterInterfaces.Steps.USER_DETAILS
441+
? classnames(authStyles['left-arrow-disable'])
442+
: classnames(authStyles['left-arrow'])
443+
}
440444
onClick={() => {
441445
if (currentStep !== RegisterInterfaces.Steps.USER_DETAILS) {
442446
this.handleStepChange(currentStep, currentStep - 1);
@@ -483,7 +487,11 @@ export class Register extends React.Component<RegisterInterfaces.Props, Register
483487
</li>
484488
</ul>
485489
<div
486-
className={classnames(authStyles['right-arrow'])}
490+
className={
491+
currentStep === RegisterInterfaces.Steps.OTHERS
492+
? classnames(authStyles['right-arrow-disable'])
493+
: classnames(authStyles['right-arrow'])
494+
}
487495
onClick={() => {
488496
if (currentStep !== RegisterInterfaces.Steps.OTHERS) {
489497
this.handleStepChange(currentStep, currentStep + 1);

src/app/components/ReactTour.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,11 @@ export default class ReactTour extends React.Component<
218218
return (
219219
<Tour
220220
accentColor={'#5b5656'}
221-
className="helper"
222221
isOpen={isTourOpen}
223222
maskClassName="mask"
223+
disableInteraction
224224
onRequestClose={this.closeTour}
225+
highlightedMaskClassName={classnames(styles['mask-highlight'])}
225226
rounded={5}
226227
steps={tourConfig}
227228
/>

src/app/styles/Authentication.module.css

+21-4
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
z-index: 10;
99
}
1010

11-
.loginRoot,.registerRoot {
11+
.loginRoot,
12+
.registerRoot {
1213
max-width: 100%;
1314
overflow-x: hidden;
1415
user-select: none;
1516
text-align: center;
1617
}
1718

18-
1919
.Authentication .customBtn:focus,
2020
.buttonPanel:focus {
2121
outline: none;
@@ -261,6 +261,15 @@
261261
bottom: 5px;
262262
cursor: pointer;
263263
}
264+
.left-arrow-disable {
265+
position: relative;
266+
left: 30%;
267+
border-radius: 50%;
268+
color: grey;
269+
font-size: 30px;
270+
bottom: 5px;
271+
}
272+
264273
.right-arrow {
265274
position: relative;
266275
right: 30%;
@@ -270,6 +279,14 @@
270279
font-size: 30px;
271280
cursor: pointer;
272281
}
282+
.right-arrow-disable {
283+
position: relative;
284+
right: 30%;
285+
bottom: 5px;
286+
border-radius: 50%;
287+
color: grey;
288+
font-size: 30px;
289+
}
273290

274291
.left-arrow:active,
275292
.left-arrow:focus {
@@ -458,11 +475,11 @@
458475
}
459476

460477
.register-h1 {
461-
margin-top: 30px;
478+
margin-top: 6%;
462479
}
463480

464481
.main-register-form {
465-
margin-top: 20px;
482+
margin-top: 1%;
466483
}
467484

468485
.error-row {

src/app/styles/ReactTour.module.css

+4
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@
66
.tour-mask {
77
background-color: red;
88
}
9+
10+
.mask-highlight {
11+
background-color: red;
12+
}

0 commit comments

Comments
 (0)