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:
Adam Bradley
2020-08-10 09:18:41 -05:00
committed by GitHub
parent 7fc13ffb2a
commit 753fd2f910
34 changed files with 81 additions and 116 deletions

View File

@ -155,15 +155,14 @@ export class Checkbox implements ComponentInterface {
aria-disabled={disabled ? 'true' : null}
aria-checked={`${checked}`}
aria-labelledby={labelId}
class={{
...createColorClasses(color),
class={createColorClasses(color, {
[mode]: true,
'in-item': hostContext('ion-item', el),
'checkbox-checked': checked,
'checkbox-disabled': disabled,
'checkbox-indeterminate': indeterminate,
'interactive': true
}}
})}
>
<svg class="checkbox-icon" viewBox="0 0 24 24" part="container">
{path}