mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-23 14:01:20 +08:00
feat(chip-button) change clear attr to fill
This commit is contained in:
@ -33,9 +33,9 @@ export class ChipButton {
|
||||
@Prop() mode: 'ios' | 'md';
|
||||
|
||||
/**
|
||||
* @input {boolean} If true, activates a transparent button style.
|
||||
* Set to `"clear"` for a transparent button style.
|
||||
*/
|
||||
@Prop() clear: boolean = false;
|
||||
@Prop() fill: string;
|
||||
|
||||
/**
|
||||
* @input {boolean} If true, sets the button into a disabled state.
|
||||
@ -73,15 +73,7 @@ export class ChipButton {
|
||||
* Chip buttons can only be clear or default (solid)
|
||||
*/
|
||||
private getStyleClassList(buttonType: string): string[] {
|
||||
let classList = [].concat(
|
||||
this.clear ? this.getColorClassList(this.color, buttonType, 'clear', this.mode) : []
|
||||
);
|
||||
|
||||
if (classList.length === 0) {
|
||||
classList = this.getColorClassList(this.color, buttonType, 'default', this.mode);
|
||||
}
|
||||
|
||||
return classList;
|
||||
return this.getColorClassList(this.color, buttonType, this.fill || 'default', this.mode);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -7,11 +7,6 @@
|
||||
|
||||
## Properties
|
||||
|
||||
#### clear
|
||||
|
||||
boolean
|
||||
|
||||
|
||||
#### color
|
||||
|
||||
string
|
||||
@ -22,6 +17,13 @@ string
|
||||
boolean
|
||||
|
||||
|
||||
#### fill
|
||||
|
||||
string
|
||||
|
||||
Set to `"clear"` for a transparent button style.
|
||||
|
||||
|
||||
#### href
|
||||
|
||||
string
|
||||
@ -34,11 +36,6 @@ any
|
||||
|
||||
## Attributes
|
||||
|
||||
#### clear
|
||||
|
||||
boolean
|
||||
|
||||
|
||||
#### color
|
||||
|
||||
string
|
||||
@ -49,6 +46,13 @@ string
|
||||
boolean
|
||||
|
||||
|
||||
#### fill
|
||||
|
||||
string
|
||||
|
||||
Set to `"clear"` for a transparent button style.
|
||||
|
||||
|
||||
#### href
|
||||
|
||||
string
|
||||
|
Reference in New Issue
Block a user