mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
Add shape prop to Chip
This commit is contained in:
@ -36,7 +36,13 @@ export class Chip implements ComponentInterface {
|
||||
*/
|
||||
@Prop() disabled = false;
|
||||
|
||||
/**
|
||||
* Set to 'rectangular' for a chip with sharp corners.
|
||||
*/
|
||||
@Prop({ reflect: true }) shape?: 'soft' | 'round' | 'rectangular';
|
||||
|
||||
render() {
|
||||
const { shape } = this;
|
||||
const theme = getIonTheme(this);
|
||||
|
||||
return (
|
||||
@ -44,6 +50,7 @@ export class Chip implements ComponentInterface {
|
||||
aria-disabled={this.disabled ? 'true' : null}
|
||||
class={createColorClasses(this.color, {
|
||||
[theme]: true,
|
||||
[`chip-${shape}`]: shape !== undefined,
|
||||
'chip-outline': this.outline,
|
||||
'chip-disabled': this.disabled,
|
||||
'ion-activatable': true,
|
||||
|
||||
Reference in New Issue
Block a user