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

@ -9,7 +9,7 @@ import { createColorClasses } from '../../utils/theme';
ios: 'chip.ios.scss',
md: 'chip.md.scss'
},
scoped: true
shadow: true
})
export class Chip implements ComponentInterface {
/**
@ -24,9 +24,25 @@ export class Chip implements ComponentInterface {
*/
@Prop() mode!: Mode;
/**
* Display an outline style button.
*/
@Prop() outline = false;
hostData() {
return {
class: createColorClasses(this.color),
'ion-activatable': true,
class: {
...createColorClasses(this.color),
'chip-outline': this.outline
}
};
}
render() {
return [
<slot></slot>,
this.mode === 'md' ? <ion-ripple-effect></ion-ripple-effect> : null
];
}
}