fix(rtl): fix rtl back button default (#17109)

Closes #15357
This commit is contained in:
Adam Bradley
2019-01-14 16:37:20 -06:00
committed by GitHub
parent 3aaf87ad0f
commit a9a23afce6

View File

@ -72,9 +72,13 @@ export class BackButton implements ComponentInterface {
render() {
const defaultBackButtonText = this.mode === 'ios' ? 'Back' : null;
const backButtonIcon = this.icon != null ? this.icon : this.config.get('backButtonIcon', 'arrow-back');
const backButtonText = this.text != null ? this.text : this.config.get('backButtonText', defaultBackButtonText);
let backButtonIcon = this.icon != null ? this.icon : this.config.get('backButtonIcon', 'arrow-back');
if (backButtonIcon === 'arrow-back' && document.dir === 'rtl') {
backButtonIcon = 'arrow-forward';
}
return (
<button
type="button"