mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-15 17:42:15 +08:00
refactor(chip): update styles, remove chip-icon and chip-button (#16264)
This reimplements chip, removing the extraneous chip-button and chip-icon components and updating the design to match the updated Material Design spec.
This commit is contained in:
@ -168,35 +168,13 @@ export class Checkbox {
|
||||
}
|
||||
|
||||
export declare interface Chip extends StencilComponents<'IonChip'> {}
|
||||
@Component({ selector: 'ion-chip', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: '<ng-content></ng-content>', inputs: ['color', 'mode'] })
|
||||
@Component({ selector: 'ion-chip', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: '<ng-content></ng-content>', inputs: ['color', 'mode', 'outline'] })
|
||||
export class Chip {
|
||||
|
||||
constructor(c: ChangeDetectorRef, r: ElementRef) {
|
||||
c.detach();
|
||||
const el = r.nativeElement;
|
||||
proxyInputs(this, el, ['color', 'mode']);
|
||||
}
|
||||
}
|
||||
|
||||
export declare interface ChipButton extends StencilComponents<'IonChipButton'> {}
|
||||
@Component({ selector: 'ion-chip-button', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: '<ng-content></ng-content>', inputs: ['color', 'mode', 'disabled', 'fill', 'href'] })
|
||||
export class ChipButton {
|
||||
|
||||
constructor(c: ChangeDetectorRef, r: ElementRef) {
|
||||
c.detach();
|
||||
const el = r.nativeElement;
|
||||
proxyInputs(this, el, ['color', 'mode', 'disabled', 'fill', 'href']);
|
||||
}
|
||||
}
|
||||
|
||||
export declare interface ChipIcon extends StencilComponents<'IonChipIcon'> {}
|
||||
@Component({ selector: 'ion-chip-icon', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: '<ng-content></ng-content>', inputs: ['color', 'mode', 'fill', 'name', 'src'] })
|
||||
export class ChipIcon {
|
||||
|
||||
constructor(c: ChangeDetectorRef, r: ElementRef) {
|
||||
c.detach();
|
||||
const el = r.nativeElement;
|
||||
proxyInputs(this, el, ['color', 'mode', 'fill', 'name', 'src']);
|
||||
proxyInputs(this, el, ['color', 'mode', 'outline']);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user