Skip to content

Commit

Permalink
[core] RTL support #80
Browse files Browse the repository at this point in the history
added rtl support to tabs component with mdIsRtl prop
  • Loading branch information
tom-dorofeyev committed Feb 27, 2020
1 parent 0f96730 commit 6064c2b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/MdTabs/MdTabs.vue
Expand Up @@ -63,7 +63,8 @@
},
mdSyncRoute: Boolean,
mdDynamicHeight: Boolean,
mdActiveTab: [String, Number]
mdActiveTab: [String, Number],
mdIsRtl: { type: Boolean, default: false }
},
data: () => ({
resizeObserver: null,
Expand Down Expand Up @@ -214,9 +215,8 @@
this.contentStyles = {
height: tabElement ? `${tabElement.offsetHeight}px` : 0
}
this.containerStyles = {
transform: `translate3D(${-this.activeTabIndex * 100}%, 0, 0)`
transform: `translate3D(${this.mdIsRtl ? (this.activeTabIndex) * 100 : (-this.activeTabIndex) * 100}%, 0, 0)`
}
}
},
Expand Down

0 comments on commit 6064c2b

Please sign in to comment.