Skip to content

Commit

Permalink
Fix "Prev"/"Next" button position when progress display is disabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
hakimio committed Dec 5, 2023
1 parent 80cdcd9 commit 9fe340a
Show file tree
Hide file tree
Showing 18 changed files with 70 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@
[innerHTML]="step.content"
></ion-card-content>

<div class="footer">
<div
class="footer"
[class.no-progress]="!step.showProgress"
>
<ion-button
fill="clear"
[disabled]="!tourService.hasPrev(step)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ ion-button.close {
white-space: nowrap;
}

&.no-progress {
grid-template-columns: 1fr 1fr;
}

ion-button {
text-transform: capitalize;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@
[innerHTML]="step.content"
></mat-card-content>

<mat-card-actions align="end">
<mat-card-actions
[class.no-progress]="!step.showProgress"
>
<button
mat-button
class="prev"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ mat-card-actions {
white-space: nowrap;
}

&.no-progress {
grid-template-columns: 1fr 1fr;
}

>* {
max-width: fit-content;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ <h5>{{ step?.title }}</h5>
class="card-text"
[innerHTML]="step?.content"
></p>
<div class="buttons">
<div
class="buttons"
[class.no-progress]="!step.showProgress"
>
<button
[disabled]="!tourService.hasPrev(step)"
class="btn btn-sm btn-outline-secondary prev"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
white-space: nowrap;
}

&.no-progress {
grid-template-columns: 1fr 1fr;
}

.btn {
display: flex;
align-items: center;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ <h5>{{ step?.title }}</h5>
class="card-text"
[innerHTML]="step?.content"
></p>
<div class="buttons">
<div
class="buttons"
[class.no-progress]="!step.showProgress"
>
<button
[disabled]="!tourService.hasPrev(step)"
class="btn btn-sm btn-outline-secondary prev"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
white-space: nowrap;
}

&.no-progress {
grid-template-columns: 1fr 1fr;
}

.btn {
display: flex;
align-items: center;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ <h3>{{ step?.title }}</h3>
class="content"
[innerHTML]="step?.content"
></p>
<div class="buttons">
<div
class="buttons"
[class.no-progress]="!step.showProgress"
>
<button
tuiButton
type="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
white-space: nowrap;
}

&.no-progress {
grid-template-columns: 1fr 1fr;
}

::ng-deep button.prev .t-wrapper {
padding-left: 1rem;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ <h3>{{ step?.title }}</h3>
class="content"
[innerHTML]="step?.content"
></p>
<div class="buttons">
<div
class="buttons"
[class.no-progress]="!step.showProgress"
>
<button
tuiButton
type="button"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@
white-space: nowrap;
}

&.no-progress {
grid-template-columns: 1fr 1fr;
}

::ng-deep button.prev .t-wrapper {
padding-left: 1rem;
}
Expand Down
5 changes: 4 additions & 1 deletion src/app/ion-popover/examples/default-template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
[innerHTML]="step.content"
></ion-card-content>

<div class="footer">
<div
class="footer"
[class.no-progress]="!step.showProgress"
>
<ion-button
fill="clear"
[disabled]="!tourService.hasPrev(step)"
Expand Down
4 changes: 3 additions & 1 deletion src/app/md-menu/examples/default-template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
[innerHTML]="step.content"
></mat-card-content>

<mat-card-actions align="end">
<mat-card-actions
[class.no-progress]="!step.showProgress"
>
<button
mat-button
class="prev"
Expand Down
5 changes: 4 additions & 1 deletion src/app/ng-bootstrap/examples/default-template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
class="card-text"
[innerHTML]="step?.content"
></p>
<div class="buttons">
<div
class="buttons"
[class.no-progress]="!step.showProgress"
>
<button
[disabled]="!tourService.hasPrev(step)"
class="btn btn-sm btn-outline-secondary prev"
Expand Down
5 changes: 4 additions & 1 deletion src/app/ngx-bootstrap/examples/default-template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
class="card-text"
[innerHTML]="step?.content"
></p>
<div class="buttons">
<div
class="buttons"
[class.no-progress]="!step.showProgress"
>
<button
[disabled]="!tourService.hasPrev(step)"
class="btn btn-sm btn-outline-secondary prev"
Expand Down
5 changes: 4 additions & 1 deletion src/app/tui-dropdown/examples/default-template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
class="content"
[innerHTML]="step?.content"
></p>
<div class="buttons">
<div
class="buttons"
[class.no-progress]="!step.showProgress"
>
<button
tuiButton
type="button"
Expand Down
5 changes: 4 additions & 1 deletion src/app/tui-hint/examples/default-template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@
class="content"
[innerHTML]="step?.content"
></p>
<div class="buttons">
<div
class="buttons"
[class.no-progress]="!step.showProgress"
>
<button
tuiButton
type="button"
Expand Down

0 comments on commit 9fe340a

Please sign in to comment.