Skip to content

Commit

Permalink
feat(module:divider): support standalone component (#8258)
Browse files Browse the repository at this point in the history
  • Loading branch information
ParsaArvanehPA authored Dec 4, 2023
1 parent 0f1690c commit 3a7cd50
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 23 deletions.
6 changes: 5 additions & 1 deletion components/divider/divider.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/

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

import { NzOutletModule } from 'ng-zorro-antd/core/outlet';
import { BooleanInput } from 'ng-zorro-antd/core/types';
import { InputBoolean } from 'ng-zorro-antd/core/util';

Expand All @@ -29,7 +31,9 @@ import { InputBoolean } from 'ng-zorro-antd/core/util';
'[class.ant-divider-with-text-right]': `nzText && nzOrientation === 'right'`,
'[class.ant-divider-with-text-center]': `nzText && nzOrientation === 'center'`,
'[class.ant-divider-dashed]': `nzDashed`
}
},
imports: [NgIf, NzOutletModule],
standalone: true
})
export class NzDividerComponent {
static ngAcceptInputType_nzDashed: BooleanInput;
Expand Down
7 changes: 1 addition & 6 deletions components/divider/divider.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,12 @@
* found in the LICENSE file at https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE
*/

import { BidiModule } from '@angular/cdk/bidi';
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';

import { NzOutletModule } from 'ng-zorro-antd/core/outlet';

import { NzDividerComponent } from './divider.component';

@NgModule({
imports: [BidiModule, CommonModule, NzOutletModule],
declarations: [NzDividerComponent],
imports: [NzDividerComponent],
exports: [NzDividerComponent]
})
export class NzDividerModule {}
16 changes: 8 additions & 8 deletions components/divider/doc/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ import { NzDividerModule } from 'ng-zorro-antd/divider';

## API

### nz-divider
### nz-divider:standalone

| Property | Description | Type | Default |
| -------- | ----------- | ---- | ------- |
| `[nzDashed]` | whether line is dashed | `boolean` | `false` |
| `[nzType]` | direction type of divider | `'horizontal' \| 'vertical'` | `'horizontal'` |
| `[nzText]` | inner text of divider | `string \| TemplateRef<void>` | - |
| `[nzPlain]` | Divider text show as plain style | `boolean` | `false` |
| `[nzOrientation]` | inner text orientation | `'center' \| 'left' \| 'right'` | `'center'` |
| Property | Description | Type | Default |
| ----------------- | -------------------------------- | ------------------------------- | -------------- |
| `[nzDashed]` | whether line is dashed | `boolean` | `false` |
| `[nzType]` | direction type of divider | `'horizontal' \| 'vertical'` | `'horizontal'` |
| `[nzText]` | inner text of divider | `string \| TemplateRef<void>` | - |
| `[nzPlain]` | Divider text show as plain style | `boolean` | `false` |
| `[nzOrientation]` | inner text orientation | `'center' \| 'left' \| 'right'` | `'center'` |
16 changes: 8 additions & 8 deletions components/divider/doc/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ import { NzDividerModule } from 'ng-zorro-antd/divider';

## API

### nz-divider
### nz-divider:standalone

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

0 comments on commit 3a7cd50

Please sign in to comment.