-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14902 from primefaces/buttongroup-new
Buttongroup new
- Loading branch information
Showing
9 changed files
with
2,091 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
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,21 @@ | ||
import { CommonModule } from '@angular/common'; | ||
import { ChangeDetectionStrategy, Component, NgModule, ViewEncapsulation } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'p-buttonGroup', | ||
template: ` | ||
<span class="p-button-group p-component" role="group"> | ||
<ng-content></ng-content> | ||
</span> | ||
`, | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
encapsulation: ViewEncapsulation.None, | ||
}) | ||
export class ButtonGroup {} | ||
|
||
@NgModule({ | ||
imports: [CommonModule], | ||
exports: [ButtonGroup], | ||
declarations: [ButtonGroup] | ||
}) | ||
export class ButtonGroupModule {} |
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,6 @@ | ||
{ | ||
"$schema": "ng-packagr/ng-package.schema.json", | ||
"lib": { | ||
"entryFile": "public_api.ts" | ||
} | ||
} |
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 @@ | ||
export * from './buttongroup'; |
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,44 @@ | ||
import { Component } from '@angular/core'; | ||
import { Code } from '../../domain/code'; | ||
|
||
@Component({ | ||
selector: 'button-group-demo', | ||
template: ` | ||
<app-docsectiontext> | ||
<p>Multiple buttons are grouped when wrapped inside an element with <i>ButtonGroup</i> component.</p> | ||
</app-docsectiontext> | ||
<div class="card flex justify-content-center"> | ||
<p-buttonGroup> | ||
<button pButton pRipple label="Save" icon="pi pi-check"></button> | ||
<button pButton pRipple label="Delete" icon="pi pi-trash"></button> | ||
<button pButton pRipple label="Cancel" icon="pi pi-times"></button> | ||
</p-buttonGroup> | ||
</div> | ||
<app-code [code]="code" selector="button-group-demo"></app-code> | ||
` | ||
}) | ||
export class ButtonGroupDoc { | ||
code: Code = { | ||
basic: `<p-buttonGroup> | ||
<button pButton pRipple label="Save" icon="pi pi-check"></button> | ||
<button pButton pRipple label="Delete" icon="pi pi-trash"></button> | ||
<button pButton pRipple label="Cancel" icon="pi pi-times"></button> | ||
</p-buttonGroup>`, | ||
|
||
html: ` | ||
<div class="card flex justify-content-center"> | ||
<button pButton pRipple label="Save" icon="pi pi-check"></button> | ||
<button pButton pRipple label="Delete" icon="pi pi-trash"></button> | ||
<button pButton pRipple label="Cancel" icon="pi pi-times"></button> | ||
</div>`, | ||
|
||
typescript: ` | ||
import { Component } from '@angular/core'; | ||
@Component({ | ||
selector: 'button-group-demo', | ||
templateUrl: './button-group-demo.html' | ||
}) | ||
export class ButtonGroupDemo { }` | ||
}; | ||
} |
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
Oops, something went wrong.