-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(module:divider): add
nzVariant
option (#8827)
- Loading branch information
1 parent
1406241
commit 2c63c87
Showing
8 changed files
with
108 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
order: 4 | ||
title: | ||
zh-CN: 变体 | ||
en-US: Variant | ||
--- | ||
|
||
## zh-CN | ||
|
||
分隔线默认为 `solid`(实线)变体。您可以将其更改为 `dashed`(虚线)或 `dotted`(点线)。 | ||
|
||
## en-US | ||
|
||
Divider is of `solid` variant by default. You can change that to either `dashed` or `dotted`. |
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,41 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
import { NzDividerModule } from 'ng-zorro-antd/divider'; | ||
|
||
@Component({ | ||
selector: 'nz-demo-divider-variant', | ||
standalone: true, | ||
imports: [NzDividerModule], | ||
template: ` | ||
<div> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae | ||
sunt a te dicta? Refert tamen, quo modo. | ||
</p> | ||
<nz-divider nzPlain nzText="Solid" nzVariant="solid"></nz-divider> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae | ||
sunt a te dicta? Refert tamen, quo modo. | ||
</p> | ||
<nz-divider nzPlain nzText="Dotted" nzVariant="dotted"></nz-divider> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae | ||
sunt a te dicta? Refert tamen, quo modo. | ||
</p> | ||
<nz-divider nzPlain nzText="Dashed" nzVariant="dashed"></nz-divider> | ||
<p> | ||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed nonne merninisti licere mihi ista probare, quae | ||
sunt a te dicta? Refert tamen, quo modo. | ||
</p> | ||
</div> | ||
`, | ||
styles: [ | ||
` | ||
nz-divider::after, | ||
nz-divider::before { | ||
border-color: #7cb305 !important; | ||
} | ||
` | ||
] | ||
}) | ||
export class NzDemoDividerVariantComponent {} |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
@import './index.less'; | ||
@import './patch.less'; |
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,19 @@ | ||
.@{divider-prefix-cls} { | ||
&-dotted { | ||
background: none; | ||
border-color: @divider-color; | ||
border-style: dotted; | ||
border-width: @border-width-base 0 0; | ||
} | ||
|
||
&-horizontal&-with-text&-dotted { | ||
&::after, | ||
&::before { | ||
border-style: dotted none none; | ||
} | ||
} | ||
|
||
&-vertical&-dotted { | ||
border-width: 0 0 0 @border-width-base; | ||
} | ||
} |