fix(item): update hostContext to use ion-item element

fixes styling issues with children elements using the .in-item class
This commit is contained in:
Brandy Carney
2018-09-13 11:45:43 -04:00
parent 6c62e6cdc9
commit 21d1f2e2dd
7 changed files with 7 additions and 7 deletions

View File

@ -120,7 +120,7 @@ export class Checkbox {
return { return {
class: { class: {
...createColorClasses(this.color), ...createColorClasses(this.color),
'in-item': hostContext('.item', this.el), 'in-item': hostContext('ion-item', this.el),
'checkbox-checked': this.checked, 'checkbox-checked': this.checked,
'checkbox-disabled': this.disabled, 'checkbox-disabled': this.disabled,
'checkbox-key': this.keyFocus, 'checkbox-key': this.keyFocus,

View File

@ -325,7 +325,7 @@ export class Input {
class: { class: {
...createColorClasses(this.color), ...createColorClasses(this.color),
'in-item': hostContext('.item', this.el), 'in-item': hostContext('ion-item', this.el),
'has-value': this.hasValue(), 'has-value': this.hasValue(),
'has-focus': this.hasFocus 'has-focus': this.hasFocus
} }

View File

@ -449,7 +449,7 @@ export class Menu implements MenuI {
this.gesture.setDisabled(!isActive || !this.swipeGesture); this.gesture.setDisabled(!isActive || !this.swipeGesture);
} }
// Close menu inmediately // Close menu immediately
if (!isActive && this._isOpen) { if (!isActive && this._isOpen) {
// close if this menu is open, and should not be enabled // close if this menu is open, and should not be enabled
this.forceClosing(); this.forceClosing();

View File

@ -172,7 +172,7 @@ export class Radio {
return { return {
class: { class: {
...createColorClasses(this.color), ...createColorClasses(this.color),
'in-item': hostContext('.item', this.el), 'in-item': hostContext('ion-item', this.el),
'interactive': true, 'interactive': true,
'radio-checked': this.checked, 'radio-checked': this.checked,
'radio-disabled': this.disabled, 'radio-disabled': this.disabled,

View File

@ -330,7 +330,7 @@ export class Range {
return { return {
class: { class: {
...createColorClasses(this.color), ...createColorClasses(this.color),
'in-item': hostContext('.item', this.el), 'in-item': hostContext('ion-item', this.el),
'range-disabled': this.disabled, 'range-disabled': this.disabled,
'range-pressed': this.pressedKnob !== undefined, 'range-pressed': this.pressedKnob !== undefined,
'range-has-pin': this.pin 'range-has-pin': this.pin

View File

@ -458,7 +458,7 @@ export class Select {
hostData() { hostData() {
return { return {
class: { class: {
'in-item': hostContext('.item', this.el), 'in-item': hostContext('ion-item', this.el),
'select-disabled': this.disabled, 'select-disabled': this.disabled,
'select-key': this.keyFocus 'select-key': this.keyFocus
} }

View File

@ -175,7 +175,7 @@ export class Toggle {
return { return {
class: { class: {
...createColorClasses(this.color), ...createColorClasses(this.color),
'in-item': hostContext('.item', this.el), 'in-item': hostContext('ion-item', this.el),
'toggle-activated': this.activated, 'toggle-activated': this.activated,
'toggle-checked': this.checked, 'toggle-checked': this.checked,
'toggle-disabled': this.disabled, 'toggle-disabled': this.disabled,