import React, { Component } from 'react'
import { View, Text } from 'react-native'
import Tabs from './Tabs'
import Tab from './Tabs/Tab'

export default class ExamplePage extends Component {
  state = {
    selectedTab: 1
  }

  render() {
    return (
      <Tabs>
        <Tab
          title="Tab 1"
          selected={this.state.selectedTab === 1}
          onPress={() => this.setState({selectedTab: 1})}>
          <View>
            <Text>This is the content for Tab 1</Text>
          </View>
        </Tab>
        <Tab
          title="Tab 2"
          selected={this.state.selectedTab === 2}
          onPress={() => this.setState({selectedTab: 2})}>
          <View>
            <Text>This is the content for Tab 2</Text>
          </View>
        </Tab>
      </Tabs>
    )
  }
}