refactor(back-button): convert to shadow component (#19411)

references #18899
This commit is contained in:
Adam Bradley
2019-11-14 13:39:35 -06:00
committed by Liam DeBeasi
parent b793214fe1
commit 0d40d3f3b7
5 changed files with 12 additions and 8 deletions

View File

@ -102,7 +102,6 @@
// Back Button States
// --------------------------------------------------
:host-context(.can-go-back > ion-header),
:host(.show-back-button) {
display: block;
}

View File

@ -15,7 +15,7 @@ import { createColorClasses, openURL } from '../../utils/theme';
ios: 'back-button.ios.scss',
md: 'back-button.md.scss'
},
scoped: true
shadow: true
})
export class BackButton implements ComponentInterface, ButtonInterface {
@ -106,10 +106,10 @@ export class BackButton implements ComponentInterface, ButtonInterface {
'show-back-button': showBackButton
}}
>
<button type={type} disabled={disabled} class="button-native">
<button type={type} disabled={disabled} class="button-native" part="button">
<span class="button-inner">
{backButtonIcon && <ion-icon icon={backButtonIcon} lazy={false}></ion-icon>}
{backButtonText && <span class="button-text">{backButtonText}</span>}
{backButtonIcon && <ion-icon icon={backButtonIcon} lazy={false} part="icon"></ion-icon>}
{backButtonText && <span class="button-text" part="text">{backButtonText}</span>}
</span>
{mode === 'md' && <ion-ripple-effect type={this.rippleType}></ion-ripple-effect>}
</button>