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:
Cam Wiegert
2018-11-08 14:58:29 -06:00
committed by GitHub
parent 6794447e10
commit 91f07bc097
28 changed files with 304 additions and 1177 deletions

View File

@ -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']);
}
}