-
Notifications
You must be signed in to change notification settings - Fork 959
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Artur Yorsh
committed
Oct 23, 2018
1 parent
a6526fd
commit 9e402b0
Showing
5 changed files
with
90 additions
and
29 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { | ||
View, | ||
Text, | ||
ViewPropTypes, | ||
} from 'react-native'; | ||
import { RkStyleSheet } from 'react-native-ui-kitten'; | ||
|
||
export class TabContentScreen extends React.Component { | ||
static propTypes = { | ||
message: PropTypes.string, | ||
...ViewPropTypes, | ||
}; | ||
static defaultProps = { | ||
message: 'I <3 React Native UI Kitten', | ||
}; | ||
|
||
render() { | ||
return ( | ||
<View style={[styles.container, this.props.style]}> | ||
<Text style={styles.text}>{this.props.message}</Text> | ||
</View> | ||
); | ||
} | ||
} | ||
|
||
const styles = RkStyleSheet.create(theme => ({ | ||
container: { | ||
flex: 1, | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
}, | ||
text: { | ||
color: theme.colors.text.inverse, | ||
fontSize: 18, | ||
fontWeight: '700', | ||
}, | ||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React from 'react'; | ||
import { View } from 'react-native'; | ||
import { | ||
RkTabSet, | ||
RkTabSetItem, | ||
RkStyleSheet, | ||
} from 'react-native-ui-kitten'; | ||
import { TabContentScreen } from './TabContentScreen'; | ||
|
||
export class TabSetScreen extends React.Component { | ||
static navigationOptions = { | ||
title: 'Tab Set', | ||
}; | ||
static propTypes = {}; | ||
|
||
render() { | ||
return ( | ||
<View style={styles.container}> | ||
<RkTabSet> | ||
<RkTabSetItem title="Tab #1"> | ||
<TabContentScreen style={styles.tabContent1} /> | ||
</RkTabSetItem> | ||
<RkTabSetItem title="Tab #2" isSelected={true}> | ||
<TabContentScreen style={styles.tabContent2} message='Tab 2 loves React Native UI Kitten' /> | ||
</RkTabSetItem> | ||
<RkTabSetItem title="Tab #3"> | ||
<TabContentScreen style={styles.tabContent3} /> | ||
</RkTabSetItem> | ||
</RkTabSet> | ||
</View> | ||
); | ||
} | ||
} | ||
|
||
const styles = RkStyleSheet.create(theme => ({ | ||
container: { | ||
flex: 1, | ||
backgroundColor: theme.colors.background, | ||
}, | ||
tabContent1: { | ||
backgroundColor: 'red', | ||
}, | ||
tabContent2: { | ||
backgroundColor: 'green', | ||
}, | ||
tabContent3: { | ||
backgroundColor: 'blue', | ||
}, | ||
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters