mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +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:
@ -389,19 +389,17 @@ export class Segment implements ComponentInterface {
|
||||
|
||||
render() {
|
||||
const mode = getIonMode(this);
|
||||
|
||||
return (
|
||||
<Host
|
||||
onClick={this.onClick}
|
||||
class={{
|
||||
...createColorClasses(this.color),
|
||||
class={createColorClasses(this.color, {
|
||||
[mode]: true,
|
||||
'in-toolbar': hostContext('ion-toolbar', this.el),
|
||||
'in-toolbar-color': hostContext('ion-toolbar[color]', this.el),
|
||||
'segment-activated': this.activated,
|
||||
'segment-disabled': this.disabled,
|
||||
'segment-scrollable': this.scrollable
|
||||
}}
|
||||
})}
|
||||
>
|
||||
<slot></slot>
|
||||
</Host>
|
||||
|
Reference in New Issue
Block a user