feature(Nya deltagare): Använd nya dialogen (TV-845)
Merge in TEA/mina-sidor-fa-web from feature(Nya-deltagare)-Använd-nya-dialogen-(TV-845) to develop
Squashed commit of the following:
commit cdc3acefcdd6e209e8009fb767ae375a0db2935a
Merge: f9354d04 1de76242
Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se>
Date: Tue Dec 28 14:26:35 2021 +0100
Merge branch 'develop' into feature(Nya-deltagare)-Använd-nya-dialogen-(TV-845)
commit f9354d04f51425cce29f13a10b32555113edaaa2
Author: Daniel Appelgren <daniel.appelgren@arbetsformedlingen.se>
Date: Tue Dec 28 09:16:54 2021 +0100
feature(Nya deltagare): Använd nya dialogen (TV-845)
This commit is contained in:
@@ -4,6 +4,10 @@ export const UI_DIALOG_DATA = 'UI_DIALOG_DATA';
|
||||
|
||||
export interface UiDialogConfig<DialogInputData = unknown> {
|
||||
data?: DialogInputData;
|
||||
minWidth?: string;
|
||||
maxWidth?: string;
|
||||
minHeight?: string;
|
||||
maxHeight?: string;
|
||||
|
||||
/**
|
||||
* primaryButtonText defaults to 'Stäng'
|
||||
|
||||
@@ -5,7 +5,7 @@ import { UiDialogRef } from '@ui/dialog/ui-dialog-ref';
|
||||
import { UiDialogComponent } from './ui-dialog.component';
|
||||
import { UI_DIALOG_DATA, UiDialogConfig } from '@ui/dialog/ui-dialog.model';
|
||||
|
||||
@Injectable()
|
||||
@Injectable({ providedIn: 'root' })
|
||||
export class UiDialog {
|
||||
constructor(private overlay: Overlay, private injector: Injector) {}
|
||||
|
||||
@@ -26,8 +26,10 @@ export class UiDialog {
|
||||
const positionStrategy = this.overlay.position().global().centerHorizontally().centerVertically();
|
||||
const configs = new OverlayConfig({
|
||||
positionStrategy,
|
||||
minWidth: '40rem',
|
||||
minHeight: '40rem',
|
||||
minWidth: config.minWidth ?? '40rem',
|
||||
minHeight: config.minHeight ?? '40rem',
|
||||
maxWidth: config.maxWidth ?? '60rem',
|
||||
maxHeight: config.maxHeight ?? '60rem',
|
||||
hasBackdrop: true,
|
||||
scrollStrategy: this.overlay.scrollStrategies.close(),
|
||||
backdropClass: 'cdk-overlay-dark-backdrop',
|
||||
|
||||
Reference in New Issue
Block a user