-
Notifications
You must be signed in to change notification settings - Fork 92
Expand file tree
/
Copy pathTintColors.tsx
More file actions
60 lines (57 loc) · 1.53 KB
/
TintColors.tsx
File metadata and controls
60 lines (57 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import * as React from 'react';
import TabView, { SceneMap } from 'react-native-bottom-tabs';
import { useState } from 'react';
import { Article } from '../Screens/Article';
import { Albums } from '../Screens/Albums';
import { Contacts } from '../Screens/Contacts';
import { Chat } from '../Screens/Chat';
export default function TintColorsExample() {
const [index, setIndex] = useState(0);
const [routes] = useState([
{
key: 'article',
title: 'Article',
focusedIcon: require('../../assets/icons/article_dark.png'),
unfocusedIcon: require('../../assets/icons/chat_dark.png'),
badge: '!',
},
{
key: 'albums',
title: 'Albums',
focusedIcon: require('../../assets/icons/grid_dark.png'),
badge: '5',
activeTintColor: 'green',
},
{
key: 'contacts',
focusedIcon: require('../../assets/icons/person_dark.png'),
title: 'Contacts',
activeTintColor: 'yellow',
},
{
key: 'chat',
focusedIcon: {
uri: 'https://upload.wikimedia.org/wikipedia/commons/f/fa/Apple_logo_black.svg',
},
title: 'Chat',
},
]);
const renderScene = SceneMap({
article: Article,
albums: Albums,
contacts: Contacts,
chat: Chat,
});
return (
<TabView
sidebarAdaptable
navigationState={{ index, routes }}
onIndexChange={setIndex}
renderScene={renderScene}
tabBarActiveTintColor="red"
tabBarInactiveTintColor="orange"
scrollEdgeAppearance="default"
borderColor="red"
/>
);
}