@ionic/core
Version:
Base components for Ionic
36 lines (35 loc) • 1.05 kB
JavaScript
import { createColorClasses } from '../../utils/theme';
export class Chip {
constructor() {
this.outline = false;
}
hostData() {
return {
class: Object.assign({}, createColorClasses(this.color), { 'chip-outline': this.outline, 'ion-activatable': true })
};
}
render() {
return [
h("slot", null),
this.mode === 'md' ? h("ion-ripple-effect", null) : null
];
}
static get is() { return "ion-chip"; }
static get encapsulation() { return "shadow"; }
static get properties() { return {
"color": {
"type": String,
"attr": "color"
},
"mode": {
"type": String,
"attr": "mode"
},
"outline": {
"type": Boolean,
"attr": "outline"
}
}; }
static get style() { return "/**style-placeholder:ion-chip:**/"; }
static get styleMode() { return "/**style-id-placeholder:ion-chip:**/"; }
}