mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 05:21:52 +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:
@ -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
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user