Update tabBar icons
This commit is contained in:
parent
e014777c9e
commit
64afe08fe6
|
@ -18,7 +18,7 @@ const Footer = React.memo(({ onSearchPressed, onBackspacePressed }: IFooterProps
|
||||||
</BorderlessButton>
|
</BorderlessButton>
|
||||||
|
|
||||||
<Pressable onPress={onBackspacePressed} hitSlop={BUTTON_HIT_SLOP} style={({ pressed }) => [{ opacity: pressed ? 0.7 : 1 }]}>
|
<Pressable onPress={onBackspacePressed} hitSlop={BUTTON_HIT_SLOP} style={({ pressed }) => [{ opacity: pressed ? 0.7 : 1 }]}>
|
||||||
<CustomIcon color={colors.auxiliaryTintColor} size={25} name='backspace' />
|
<CustomIcon color={colors.auxiliaryTintColor} size={24} name='backspace' />
|
||||||
</Pressable>
|
</Pressable>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Text, Pressable, View } from 'react-native';
|
import { Pressable, View } from 'react-native';
|
||||||
|
|
||||||
import styles from './styles';
|
import styles from './styles';
|
||||||
import { useTheme } from '../../theme';
|
import { useTheme } from '../../theme';
|
||||||
import { ITabBarProps } from './interfaces';
|
import { ITabBarProps } from './interfaces';
|
||||||
import { isIOS } from '../../lib/methods/helpers';
|
import { isIOS } from '../../lib/methods/helpers';
|
||||||
|
import { CustomIcon } from '../CustomIcon';
|
||||||
|
|
||||||
const TabBar = ({ activeTab, tabs, goToPage, tabEmojiStyle }: ITabBarProps): React.ReactElement => {
|
const TabBar = ({ activeTab, tabs, goToPage }: ITabBarProps): React.ReactElement => {
|
||||||
const { colors } = useTheme();
|
const { colors } = useTheme();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -23,7 +24,7 @@ const TabBar = ({ activeTab, tabs, goToPage, tabEmojiStyle }: ITabBarProps): Rea
|
||||||
backgroundColor: isIOS && pressed ? colors.bannerBackground : 'transparent'
|
backgroundColor: isIOS && pressed ? colors.bannerBackground : 'transparent'
|
||||||
}
|
}
|
||||||
]}>
|
]}>
|
||||||
<Text style={[styles.tabEmoji, tabEmojiStyle]}>{tab}</Text>
|
<CustomIcon name={tab} size={24} color={colors.titleText} />
|
||||||
<View style={activeTab === i ? [styles.activeTabLine, { backgroundColor: colors.tintColor }] : styles.tabLine} />
|
<View style={activeTab === i ? [styles.activeTabLine, { backgroundColor: colors.tintColor }] : styles.tabLine} />
|
||||||
</Pressable>
|
</Pressable>
|
||||||
))}
|
))}
|
||||||
|
|
|
@ -1,43 +1,43 @@
|
||||||
const list = ['frequentlyUsed', 'custom', 'people', 'nature', 'food', 'activity', 'travel', 'objects', 'symbols', 'flags'];
|
const list = ['frequentlyUsed', 'custom', 'people', 'nature', 'food', 'activity', 'travel', 'objects', 'symbols', 'flags'];
|
||||||
const tabs = [
|
const tabs = [
|
||||||
{
|
{
|
||||||
tabLabel: '🕒',
|
tabLabel: 'clock',
|
||||||
category: list[0]
|
category: list[0]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
tabLabel: '🚀',
|
tabLabel: 'rocket',
|
||||||
category: list[1]
|
category: list[1]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
tabLabel: '😃',
|
tabLabel: 'emoji',
|
||||||
category: list[2]
|
category: list[2]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
tabLabel: '🐶',
|
tabLabel: 'leaf',
|
||||||
category: list[3]
|
category: list[3]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
tabLabel: '🍔',
|
tabLabel: 'burger',
|
||||||
category: list[4]
|
category: list[4]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
tabLabel: '⚽',
|
tabLabel: 'basketball',
|
||||||
category: list[5]
|
category: list[5]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
tabLabel: '🚌',
|
tabLabel: 'airplane',
|
||||||
category: list[6]
|
category: list[6]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
tabLabel: '💡',
|
tabLabel: 'lamp-bulb',
|
||||||
category: list[7]
|
category: list[7]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
tabLabel: '💛',
|
tabLabel: 'percentage',
|
||||||
category: list[8]
|
category: list[8]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
tabLabel: '🏁',
|
tabLabel: 'flag',
|
||||||
category: list[9]
|
category: list[9]
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { StyleProp, TextStyle } from 'react-native';
|
import { StyleProp, TextStyle } from 'react-native';
|
||||||
|
|
||||||
|
import { TIconsName } from '../CustomIcon';
|
||||||
import { IEmoji } from '../../definitions';
|
import { IEmoji } from '../../definitions';
|
||||||
|
|
||||||
export enum EventTypes {
|
export enum EventTypes {
|
||||||
|
@ -24,6 +25,6 @@ export interface IFooterProps {
|
||||||
export interface ITabBarProps {
|
export interface ITabBarProps {
|
||||||
goToPage?: (page: number) => void;
|
goToPage?: (page: number) => void;
|
||||||
activeTab?: number;
|
activeTab?: number;
|
||||||
tabs?: string[];
|
tabs?: TIconsName[];
|
||||||
tabEmojiStyle: StyleProp<TextStyle>;
|
tabEmojiStyle: StyleProp<TextStyle>;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,14 +8,13 @@ export default StyleSheet.create({
|
||||||
},
|
},
|
||||||
tabsContainer: {
|
tabsContainer: {
|
||||||
height: 45,
|
height: 45,
|
||||||
flexDirection: 'row',
|
flexDirection: 'row'
|
||||||
paddingTop: 5
|
|
||||||
},
|
},
|
||||||
tab: {
|
tab: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
paddingBottom: 10
|
paddingVertical: 10
|
||||||
},
|
},
|
||||||
tabEmoji: {
|
tabEmoji: {
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
|
|
Loading…
Reference in New Issue