-
Notifications
You must be signed in to change notification settings - Fork 167
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
1 parent
ed67c03
commit 9c69642
Showing
5 changed files
with
53 additions
and
14 deletions.
There are no files selected for viewing
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
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,41 @@ | ||
import React from 'react' | ||
import { StyleSheet } from 'react-native' | ||
import { Tabs, MaterialTabBar } from 'react-native-collapsible-tab-view' | ||
|
||
import { ArticleContent } from './Shared/Article' | ||
import { HEADER_HEIGHT, buildHeader } from './Shared/Header' | ||
import { ExampleComponentType } from './types' | ||
|
||
const title = 'Single Tab' | ||
|
||
const Header = buildHeader(title) | ||
|
||
const SingleTabExample: ExampleComponentType = () => { | ||
return ( | ||
<Tabs.Container | ||
renderHeader={Header} | ||
headerHeight={HEADER_HEIGHT} | ||
renderTabBar={(props) => ( | ||
<MaterialTabBar | ||
{...props} | ||
scrollEnabled | ||
contentContainerStyle={styles.padding} | ||
/> | ||
)} | ||
> | ||
<Tabs.Tab name="article" label="Article"> | ||
<Tabs.ScrollView> | ||
<ArticleContent /> | ||
</Tabs.ScrollView> | ||
</Tabs.Tab> | ||
</Tabs.Container> | ||
) | ||
} | ||
|
||
SingleTabExample.title = title | ||
|
||
export default SingleTabExample | ||
|
||
const styles = StyleSheet.create({ | ||
padding: { paddingHorizontal: 30 }, | ||
}) |
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