mirror of https://github.com/ghostfolio/ghostfolio
6 changed files with 33 additions and 9 deletions
@ -1,7 +1,7 @@ |
|||
@if (deviceType === 'mobile') { |
|||
<div class="d-flex justify-content-center" mat-dialog-actions> |
|||
<button mat-button (click)="onClickCloseButton()"> |
|||
<ion-icon name="close" size="large" /> |
|||
<button mat-icon-button (click)="onClickCloseButton()"> |
|||
<ion-icon class="d-block text-body-secondary" name="close-outline" /> |
|||
</button> |
|||
</div> |
|||
} |
|||
|
|||
@ -1,3 +1,8 @@ |
|||
:host { |
|||
display: block; |
|||
|
|||
button[mat-icon-button] { |
|||
// Show the touch target of 48px, which the density of the theme hides |
|||
--mat-icon-button-touch-target-display: block; |
|||
} |
|||
} |
|||
|
|||
@ -1,12 +1,16 @@ |
|||
<div class="d-flex" mat-dialog-title> |
|||
<div |
|||
class="d-flex" |
|||
mat-dialog-title |
|||
[class.with-close-button]="deviceType() !== 'mobile'" |
|||
> |
|||
<span |
|||
class="flex-grow-1 text-truncate" |
|||
[class.text-center]="position() === 'center'" |
|||
>{{ title() }}</span |
|||
> |
|||
@if (deviceType() !== 'mobile') { |
|||
<button class="no-min-width px-0" mat-button (click)="onClickCloseButton()"> |
|||
<ion-icon name="close" size="large" /> |
|||
<button mat-icon-button (click)="onClickCloseButton()"> |
|||
<ion-icon class="d-block text-body-secondary" name="close-outline" /> |
|||
</button> |
|||
} |
|||
</div> |
|||
|
|||
@ -1,3 +1,18 @@ |
|||
:host { |
|||
display: block; |
|||
|
|||
button[mat-icon-button] { |
|||
// Move the button to the corner with the same distance to the top and to the right |
|||
margin-right: -0.8125rem; |
|||
// Center the button on the title |
|||
margin-top: 0.125rem; |
|||
} |
|||
|
|||
.with-close-button { |
|||
.text-center { |
|||
// Compensate for the width of the button (1.75rem minus the negative |
|||
// margin) to center the title in the dialog |
|||
padding-left: 0.9375rem; |
|||
} |
|||
} |
|||
} |
|||
|
|||
Loading…
Reference in new issue