mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 21:48:42 +08:00
chore(colorClass): update createColorClasses() for ts4 (#21896)
Change the createColorClasses() fn so the returned type and jsx class property work well with typescript 4
This commit is contained in:
@ -204,8 +204,7 @@ export class Button implements ComponentInterface, AnchorInterface, ButtonInterf
|
||||
<Host
|
||||
onClick={this.handleClick}
|
||||
aria-disabled={disabled ? 'true' : null}
|
||||
class={{
|
||||
...createColorClasses(color),
|
||||
class={createColorClasses(color, {
|
||||
[mode]: true,
|
||||
[buttonType]: true,
|
||||
[`${buttonType}-${expand}`]: expand !== undefined,
|
||||
@ -219,7 +218,7 @@ export class Button implements ComponentInterface, AnchorInterface, ButtonInterf
|
||||
'button-disabled': disabled,
|
||||
'ion-activatable': true,
|
||||
'ion-focusable': true,
|
||||
}}
|
||||
})}
|
||||
>
|
||||
<TagType
|
||||
{...attrs}
|
||||
|
Reference in New Issue
Block a user