-
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:space): add space compact component
- Loading branch information
1 parent
c64e1a1
commit 3c1cbd5
Showing
27 changed files
with
580 additions
and
19 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
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,14 @@ | ||
--- | ||
order: 8 | ||
title: | ||
zh-CN: 垂直方向紧凑布局 | ||
en-US: Vertical Compact Mode | ||
--- | ||
|
||
## zh-CN | ||
|
||
垂直方向的紧凑布局,目前仅支持 Button 组合。 | ||
|
||
## en-US | ||
|
||
Vertical Mode for Space.Compact, support Button only. |
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,25 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'nz-demo-space-compact-button-vertical', | ||
template: ` | ||
<nz-space> | ||
<nz-space-compact *nzSpaceItem nzDirection="vertical"> | ||
<button nz-button>Button 1</button> | ||
<button nz-button>Button 2</button> | ||
<button nz-button>Button 3</button> | ||
</nz-space-compact> | ||
<nz-space-compact *nzSpaceItem nzDirection="vertical"> | ||
<button nz-button nzType="dashed">Button 1</button> | ||
<button nz-button nzType="dashed">Button 2</button> | ||
<button nz-button nzType="dashed">Button 3</button> | ||
</nz-space-compact> | ||
<nz-space-compact *nzSpaceItem nzDirection="vertical"> | ||
<button nz-button nzType="primary">Button 1</button> | ||
<button nz-button nzType="primary">Button 2</button> | ||
<button nz-button nzType="primary">Button 3</button> | ||
</nz-space-compact> | ||
</nz-space> | ||
` | ||
}) | ||
export class NzDemoSpaceCompactButtonVerticalComponent {} |
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: 7 | ||
title: | ||
zh-CN: Button 紧凑布局 | ||
en-US: Button Compact Mode | ||
--- | ||
|
||
## zh-CN | ||
|
||
Button 组件紧凑排列的示例。 | ||
|
||
## en-US | ||
|
||
Button component compact example. |
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,86 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'nz-demo-space-compact-buttons', | ||
template: ` | ||
<nz-space-compact nzBlock> | ||
<button nz-button nz-tooltip nzTooltipTitle="Like"> | ||
<span nz-icon nzType="like"></span> | ||
</button> | ||
<button nz-button nz-tooltip nzTooltipTitle="Comment"> | ||
<span nz-icon nzType="comment"></span> | ||
</button> | ||
<button nz-button nz-tooltip nzTooltipTitle="Star"> | ||
<span nz-icon nzType="star"></span> | ||
</button> | ||
<button nz-button nz-tooltip nzTooltipTitle="Heart"> | ||
<span nz-icon nzType="heart"></span> | ||
</button> | ||
<button nz-button nz-tooltip nzTooltipTitle="Share"> | ||
<span nz-icon nzType="share-alt"></span> | ||
</button> | ||
<button nz-button nz-tooltip nzTooltipTitle="Download"> | ||
<span nz-icon nzType="download"></span> | ||
</button> | ||
<nz-dropdown-menu #menu> | ||
<ul nz-menu> | ||
<li nz-menu-item> | ||
<a>1st item</a> | ||
</li> | ||
<li nz-menu-item> | ||
<a>2nd item</a> | ||
</li> | ||
<li nz-menu-item> | ||
<a>3rd item</a> | ||
</li> | ||
</ul> | ||
</nz-dropdown-menu> | ||
<button nz-button nz-dropdown [nzDropdownMenu]="menu"> | ||
<span nz-icon nzType="ellipsis"></span> | ||
</button> | ||
</nz-space-compact> | ||
<br /> | ||
<nz-space-compact nzBlock> | ||
<button nz-button nzType="primary">Button 1</button> | ||
<button nz-button nzType="primary">Button 2</button> | ||
<button nz-button nzType="primary">Button 3</button> | ||
<button nz-button nzType="primary">Button 4</button> | ||
<button nz-button nzType="primary" disabled nz-tooltip nzTooltipTitle="Tooltip"> | ||
<span nz-icon nzType="download"></span> | ||
</button> | ||
<button nz-button nzType="primary" nz-tooltip nzTooltipTitle="Tooltip"> | ||
<span nz-icon nzType="download"></span> | ||
</button> | ||
</nz-space-compact> | ||
<br /> | ||
<nz-space-compact nzBlock> | ||
<button nz-button>Button 1</button> | ||
<button nz-button>Button 2</button> | ||
<button nz-button>Button 3</button> | ||
<button nz-button disabled nz-tooltip nzTooltipTitle="Tooltip"> | ||
<span nz-icon nzType="download"></span> | ||
</button> | ||
<button nz-button nz-tooltip nzTooltipTitle="Tooltip"> | ||
<span nz-icon nzType="download"></span> | ||
</button> | ||
<button nz-button nzType="primary">Button 4</button> | ||
<nz-dropdown-menu #menu> | ||
<ul nz-menu> | ||
<li nz-menu-item> | ||
<a>1st item</a> | ||
</li> | ||
<li nz-menu-item> | ||
<a>2nd item</a> | ||
</li> | ||
<li nz-menu-item> | ||
<a>3rd item</a> | ||
</li> | ||
</ul> | ||
</nz-dropdown-menu> | ||
<button nz-button nzType="primary" nz-dropdown [nzDropdownMenu]="menu"> | ||
<span nz-icon nzType="ellipsis"></span> | ||
</button> | ||
</nz-space-compact> | ||
` | ||
}) | ||
export class NzDemoSpaceCompactButtonsComponent {} |
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: 6 | ||
title: | ||
zh-CN: 紧凑布局组合 | ||
en-US: Compact Mode | ||
--- | ||
|
||
## zh-CN | ||
|
||
使用 `<nz-space-compact>` 让表单组件之间紧凑连接且合并边框。 | ||
|
||
## en-US | ||
|
||
Compact Mode for form component. |
Oops, something went wrong.