Skip to content

Commit

Permalink
Merge f4fb4e0 into 354a228
Browse files Browse the repository at this point in the history
  • Loading branch information
saeedrahimi committed Oct 1, 2019
2 parents 354a228 + f4fb4e0 commit b18c639
Show file tree
Hide file tree
Showing 13 changed files with 413 additions and 31 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,12 @@ navWrapper={(content) => <Sortable>{content}</Sortable>}
<th>rc-tabs</th>
<td>prefix class name, use to custom style</td>
</tr>
<tr>
<td>direction</td>
<td>String</td>
<th>ltr</th>
<td>Layout direction of tabs component, it supports RTL direction too.</td>
</tr>
</tbody>
</table>

Expand Down Expand Up @@ -258,6 +264,12 @@ tab bar with ink indicator, in addition to tab bar props, extra props:
<th></th>
<td>can set inkBar style</td>
</tr>
<tr>
<td>direction</td>
<td>String</td>
<th>ltr</th>
<td>Layout direction of InkTabBar, set it to `rtl` in right-to-left direciton</td>
</tr>
</tbody>
</table>

Expand Down Expand Up @@ -299,6 +311,12 @@ scrollable tab bar, in addition to tab bar props, extra props:
<th></th>
<td>specific the next icon</td>
</tr>
<tr>
<td>direction</td>
<td>String</td>
<th>ltr</th>
<td>Layout direction of InkTabBar, set it to `rtl` in right-to-left direciton</td>
</tr>
</tbody>
</table>

Expand Down Expand Up @@ -375,6 +393,12 @@ swipeable tab bar with ink indicator, same with tab bar/ink bar props, and below
<td>false</td>
<td>whether animate tabpane with css margin</td>
</tr>
<tr>
<td>direction</td>
<td>String</td>
<th>ltr</th>
<td>Layout direction of InkTabBar, set it to `rtl` in right-to-left direciton</td>
</tr>
</tbody>
</table>

Expand All @@ -398,6 +422,12 @@ swipeable tab panes, in addition to lib/TabContent props, extra props:
<td></td>
<td>options for react-hammerjs</td>
</tr>
<tr>
<td>direction</td>
<td>String</td>
<th>ltr</th>
<td>Layout direction of InkTabBar, set it to `rtl` in right-to-left direciton</td>
</tr>
</tbody>
</table>

Expand Down
21 changes: 21 additions & 0 deletions assets/index/bottom.less
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,23 @@
}
}

&-bottom.rtl &-tab-next {
left: 2px;
right:auto;
}

&-bottom &-tab-prev {
left: 0;
&-icon:before {
content: "<";
}
}

&-bottom.rtl &-tab-prev {
right: 0;
left:auto;
}


&-bottom &-tab-prev, &-bottom &-tab-next {
margin-right: -2px;
Expand All @@ -77,12 +88,22 @@
left: 0;
}

&-bottom.rtl &-ink-bar {
right: 0;
left:auto;
}

&-bottom &-tab {
float: left;
height: 100%;
margin-right: 30px;
}

&-bottom.rtl &-tab {
float: right;
margin-left: 30px;
margin-right: 0;
}
&-bottom &-tabpane-inactive {
height: 0;
overflow: visible;
Expand Down
8 changes: 7 additions & 1 deletion assets/index/common.less
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
list-style: none;
display: inline-block;
transform-origin: 0 0;

&-animated {
transition: transform 0.5s @easing-in-out;
}
Expand All @@ -97,6 +96,10 @@
clear: both;
}
}

&.rtl &-nav {
float: right;
}

&-tab {
box-sizing: border-box;
Expand Down Expand Up @@ -159,4 +162,7 @@
&-content-no-animated &-tabpane-inactive {
display: none;
}
&.rtl{
direction: rtl;
}
}
21 changes: 21 additions & 0 deletions assets/index/top.less
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,23 @@
}
}

&-top.rtl &-tab-next {
left: 2px;
right:auto;
}

&-top &-tab-prev {
left: 0;
&-icon:before {
content: "<";
}
}

&-top.rtl &-tab-prev {
right: 0;
left:auto;
}

&-top &-tab-prev, &-top &-tab-next {
margin-right: -2px;
width: 0;
Expand All @@ -85,12 +95,23 @@
left: 0;
}

&-top.rtl &-ink-bar {
right: 0;
left:auto;
}

&-top &-tab {
float: left;
height: 100%;
margin-right: 30px;
}

&-top.rtl &-tab {
float: right;
margin-left: 30px;
margin-right: 0;
}

&-top &-tabpane-inactive {
height: 0;
overflow: visible;
Expand Down
1 change: 1 addition & 0 deletions examples/rtl.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
placeholder

0 comments on commit b18c639

Please sign in to comment.