mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 11:17:19 +08:00
refactor(all): strict boolean conditions
This commit is contained in:
@ -16,6 +16,12 @@ export class FabButton {
|
||||
|
||||
@Element() el!: HTMLElement;
|
||||
|
||||
/**
|
||||
* The mode determines which platform styles to use.
|
||||
* Possible values are: `"ios"` or `"md"`.
|
||||
*/
|
||||
@Prop() mode!: Mode;
|
||||
|
||||
/**
|
||||
* The color to use from your application's color palette.
|
||||
* Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`.
|
||||
@ -23,12 +29,6 @@ export class FabButton {
|
||||
*/
|
||||
@Prop() color?: Color;
|
||||
|
||||
/**
|
||||
* The mode determines which platform styles to use.
|
||||
* Possible values are: `"ios"` or `"md"`.
|
||||
*/
|
||||
@Prop() mode!: Mode;
|
||||
|
||||
/**
|
||||
* If true, the fab button will be show a close icon. Defaults to `false`.
|
||||
*/
|
||||
@ -88,7 +88,7 @@ export class FabButton {
|
||||
}
|
||||
|
||||
render() {
|
||||
const TagType = this.href ? 'a' : 'button';
|
||||
const TagType = this.href === undefined ? 'button' : 'a';
|
||||
|
||||
return (
|
||||
<TagType
|
||||
|
Reference in New Issue
Block a user