Pager view and tab view built in react
import React, { Component } from 'react'
import SwiperTabComponent from 'viewpager'
import 'viewpager/dist/index.css'
class Example extends Component {
let tabs = [
{
'name': 'First',
},
{
'name': 'Second',
},
{
'name': 'Third',
}
]
render() {
return (
<SwiperTabComponent position={'top'} tabs={tabs}>
<div>
This is first child.
</div>
<div>
This is second child.
</div>
<div>
This is third child.
</div>
</SwiperTabComponent>
)
}
}MIT © nachi0310