forked from NG-ZORRO/ng-zorro-antd
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(module:modal): refactor the modal service
close NG-ZORRO#3652, close NG-ZORRO#4437, close NG-ZORRO#2749
- Loading branch information
Showing
18 changed files
with
1,297 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* @license | ||
* Copyright Alibaba.com All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE | ||
*/ | ||
|
||
import { animate, AnimationTriggerMetadata, state, style, transition, trigger } from '@angular/animations'; | ||
|
||
export const nzModalAnimations: { | ||
readonly modalContainer: AnimationTriggerMetadata; | ||
} = { | ||
modalContainer: trigger('modalContainer', [ | ||
state('void, exit', style({})), | ||
state('enter', style({})), | ||
transition('* => enter', animate('.24s', style({}))), | ||
transition('* => void, * => exit', animate('.2s', style({}))) | ||
]) | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** | ||
* @license | ||
* Copyright Alibaba.com All Rights Reserved. | ||
* | ||
* Use of this source code is governed by an MIT-style license that can be | ||
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE | ||
*/ | ||
|
||
import { ChangeDetectionStrategy, Component } from '@angular/core'; | ||
|
||
import { ModalConfig } from './nz-modal.type'; | ||
|
||
@Component({ | ||
selector: 'button[nz-modal-close]', | ||
exportAs: 'NzModalClose', | ||
template: ` | ||
<span class="ant-modal-close-x"> | ||
<ng-container *nzStringTemplateOutlet="config?.nzCloseIcon"> | ||
<i nz-icon [nzType]="config?.nzCloseIcon" class="ant-modal-close-icon"></i> | ||
</ng-container> | ||
</span> | ||
`, | ||
host: { | ||
class: 'ant-modal-close', | ||
'aria-label': 'Close' | ||
}, | ||
changeDetection: ChangeDetectionStrategy.OnPush | ||
}) | ||
export class NzModalCloseComponent { | ||
constructor(public config: ModalConfig) {} | ||
} |
Oops, something went wrong.