Skip to content

Commit 3a7cd50

Browse files
feat(module:divider): support standalone component (#8258)
1 parent 0f1690c commit 3a7cd50

File tree

4 files changed

+22
-23
lines changed

4 files changed

+22
-23
lines changed

components/divider/divider.component.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
44
*/
55

6+
import { NgIf } from '@angular/common';
67
import { ChangeDetectionStrategy, Component, Input, TemplateRef, ViewEncapsulation } from '@angular/core';
78

9+
import { NzOutletModule } from 'ng-zorro-antd/core/outlet';
810
import { BooleanInput } from 'ng-zorro-antd/core/types';
911
import { InputBoolean } from 'ng-zorro-antd/core/util';
1012

@@ -29,7 +31,9 @@ import { InputBoolean } from 'ng-zorro-antd/core/util';
2931
'[class.ant-divider-with-text-right]': `nzText && nzOrientation === 'right'`,
3032
'[class.ant-divider-with-text-center]': `nzText && nzOrientation === 'center'`,
3133
'[class.ant-divider-dashed]': `nzDashed`
32-
}
34+
},
35+
imports: [NgIf, NzOutletModule],
36+
standalone: true
3337
})
3438
export class NzDividerComponent {
3539
static ngAcceptInputType_nzDashed: BooleanInput;

components/divider/divider.module.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,12 @@
33
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
44
*/
55

6-
import { BidiModule } from '@angular/cdk/bidi';
7-
import { CommonModule } from '@angular/common';
86
import { NgModule } from '@angular/core';
97

10-
import { NzOutletModule } from 'ng-zorro-antd/core/outlet';
11-
128
import { NzDividerComponent } from './divider.component';
139

1410
@NgModule({
15-
imports: [BidiModule, CommonModule, NzOutletModule],
16-
declarations: [NzDividerComponent],
11+
imports: [NzDividerComponent],
1712
exports: [NzDividerComponent]
1813
})
1914
export class NzDividerModule {}

components/divider/doc/index.en-US.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ import { NzDividerModule } from 'ng-zorro-antd/divider';
1818

1919
## API
2020

21-
### nz-divider
21+
### nz-divider:standalone
2222

23-
| Property | Description | Type | Default |
24-
| -------- | ----------- | ---- | ------- |
25-
| `[nzDashed]` | whether line is dashed | `boolean` | `false` |
26-
| `[nzType]` | direction type of divider | `'horizontal' \| 'vertical'` | `'horizontal'` |
27-
| `[nzText]` | inner text of divider | `string \| TemplateRef<void>` | - |
28-
| `[nzPlain]` | Divider text show as plain style | `boolean` | `false` |
29-
| `[nzOrientation]` | inner text orientation | `'center' \| 'left' \| 'right'` | `'center'` |
23+
| Property | Description | Type | Default |
24+
| ----------------- | -------------------------------- | ------------------------------- | -------------- |
25+
| `[nzDashed]` | whether line is dashed | `boolean` | `false` |
26+
| `[nzType]` | direction type of divider | `'horizontal' \| 'vertical'` | `'horizontal'` |
27+
| `[nzText]` | inner text of divider | `string \| TemplateRef<void>` | - |
28+
| `[nzPlain]` | Divider text show as plain style | `boolean` | `false` |
29+
| `[nzOrientation]` | inner text orientation | `'center' \| 'left' \| 'right'` | `'center'` |

components/divider/doc/index.zh-CN.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ import { NzDividerModule } from 'ng-zorro-antd/divider';
1919

2020
## API
2121

22-
### nz-divider
22+
### nz-divider:standalone
2323

24-
| 参数 | 说明 | 类型 | 默认值 |
25-
| --- | --- | --- | --- |
26-
| `[nzDashed]` | 是否虚线 | `boolean` | `false` |
27-
| `[nzType]` | 水平还是垂直类型 | `'horizontal' \| 'vertical'` | `'horizontal'` |
28-
| `[nzText]` | 中间文字 | `string \| TemplateRef<void>` | - |
29-
| `[nzPlain]` | 文字是否显示为普通正文样式 | `boolean` | `false` |
30-
| `[nzOrientation]` | 中间文字方向 | `'center' \| 'left' \| 'right'` | `'center'` |
24+
| 参数 | 说明 | 类型 | 默认值 |
25+
| ----------------- | -------------------------- | ------------------------------- | -------------- |
26+
| `[nzDashed]` | 是否虚线 | `boolean` | `false` |
27+
| `[nzType]` | 水平还是垂直类型 | `'horizontal' \| 'vertical'` | `'horizontal'` |
28+
| `[nzText]` | 中间文字 | `string \| TemplateRef<void>` | - |
29+
| `[nzPlain]` | 文字是否显示为普通正文样式 | `boolean` | `false` |
30+
| `[nzOrientation]` | 中间文字方向 | `'center' \| 'left' \| 'right'` | `'center'` |

0 commit comments

Comments
 (0)