DefinitelyTyped/react-native-scrollable-tab-view/react-native-scrollable-tab-view-tests.tsx
CaiHuan feefb04e1c remove style isRequire attribute and add react-native-scrollable-tab-view type define file (#14020)
* remove style isRequire attribute

* commit react-native-scrollable-tab-view

* commit react-native-scrollable-tab-view/index.d.ts

* changed file extension name

* Fix test error

* fix no-trailing-whitespace  trailing whitespace
2017-01-17 13:57:11 -08:00

48 lines
1.0 KiB
TypeScript

import * as React from 'react';
import {
Text
} from 'react-native';
import ScrollableTabView from 'react-native-scrollable-tab-view';
interface MyTextProperties extends React.Props<MyText> {
tabLabel: string;
text: string;
}
class MyText extends React.Component<MyTextProperties, {}> {
public constructor(props: MyTextProperties) {
super(props);
}
public render(): JSX.Element {
return(
<Text>this.props.text</Text>
);
}
}
interface ScrollableTabViewDemoProperties {
}
class ScrollableTabViewDemo extends React.Component<ScrollableTabViewDemoProperties, {}> {
public constructor(props: ScrollableTabViewDemo) {
super(props);
}
public render(): JSX.Element {
return (
<ScrollableTabView>
<MyText tabLabel='t1' text='t1'></MyText>
<MyText tabLabel='t2' text='t2'></MyText>
<MyText tabLabel='t3' text='t3'></MyText>
</ScrollableTabView>
);
}
protected componentWillMount?(): void {
}
protected componentWillUnmount?(): void {
}
}