This repository was archived by the owner on Jul 30, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathright-to-left.tsx
More file actions
68 lines (64 loc) · 3.81 KB
/
right-to-left.tsx
File metadata and controls
68 lines (64 loc) · 3.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import * as ReactDOM from 'react-dom';
import * as React from 'react';
import { TabComponent, TabItemDirective, TabItemsDirective } from '@syncfusion/ej2-react-navigations';
import { SampleBase } from '../common/sample-base';
import './tab.component.css';
export class RTL extends SampleBase<{}, {}> {
render() {
let headertext: any;
// Mapping Tab items Header property
headertext = [{ text: "Twitter" }, { text: "Facebook" }, { text: "WhatsApp" }];
function tabContent1() {
return (
<div>
Twitter is an online social networking service that enables users to send and read short 140-character messages called 'tweets'. Registered users can read and post tweets, but those who are unregistered can only read them. Users access Twitter through the website interface, SMS or mobile device app Twitter Inc. is based in San Francisco and has more than 25 offices around the world. Twitter was created in March 2006 by Jack Dorsey, Evan Williams, Biz Stone, and Noah Glass and launched in July 2006. The service rapidly gained worldwide popularity, with more than 100 million users posting 340 million tweets a day in 2012.The service also handled 1.6 billion search queries per day.
</div>
)
}
function tabContent2() {
return (
<div>
Facebook is an online social networking service headquartered in Menlo Park, California. Its website was launched on February 4, 2004, by Mark Zuckerberg with his Harvard College roommates and fellow students Eduardo Saverin, Andrew McCollum, Dustin Moskovitz and Chris Hughes.The founders had initially limited the website's membership to Harvard students, but later expanded it to colleges in the Boston area, the Ivy League, and Stanford University. It gradually added support for students at various other universities and later to high-school students.
</div>
)
}
function tabContent3() {
return (
<div>
WhatsApp Messenger is a proprietary cross-platform instant messaging client for smartphones that operates under a subscription business model. It uses the Internet to send text messages, images, video, user location and audio media messages to other users using standard cellular mobile numbers. As of February 2016, WhatsApp had a user base of up to one billion,[10] making it the most globally popular messaging application. WhatsApp Inc., based in Mountain View, California, was acquired by Facebook Inc. on February 19, 2014, for approximately US$19.3 billion.
</div>
)
}
return (
<div className='control-pane'>
<div className='control-section tab-control-section'>
{/* Render the Tab Component */}
<TabComponent enableRtl={true} heightAdjustMode='Auto'>
<TabItemsDirective>
<TabItemDirective header={headertext[0]}
content={tabContent1} />
<TabItemDirective header={headertext[1]}
content={tabContent2} />
<TabItemDirective header={headertext[2]}
content={tabContent3} />
</TabItemsDirective>
</TabComponent>
</div>
<div id="action-description">
<p>
This sample demonstrates the RTL mode of the <code>Tab</code>. Click on the <code>header</code> element for activate the corresponding tab, and displays its <code>content</code> with right-to-left direction.
</p>
</div>
<div id="description">
<p>
The RTL sample illustrates the direction of the <code>Tab</code> from right to left.
</p>
<p>
More information about Tab can be found in this
<a target="_blank" href="http://ej2.syncfusion.com/react/documentation/tab/getting-started.html"> documentation</a> section.
</p>
</div>
</div>
);
}
}