Reduce size of TabBar
This commit is contained in:
@@ -4,8 +4,9 @@ import {LayoutChangeEvent, ScrollView, StyleSheet, View} from 'react-native'
|
|||||||
import {isNative} from '#/platform/detection'
|
import {isNative} from '#/platform/detection'
|
||||||
import {usePalette} from 'lib/hooks/usePalette'
|
import {usePalette} from 'lib/hooks/usePalette'
|
||||||
import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries'
|
import {useWebMediaQueries} from 'lib/hooks/useWebMediaQueries'
|
||||||
|
import {atoms as a} from '#/alf'
|
||||||
|
import {Text as NewText} from '#/components/Typography'
|
||||||
import {PressableWithHover} from '../util/PressableWithHover'
|
import {PressableWithHover} from '../util/PressableWithHover'
|
||||||
import {Text} from '../util/text/Text'
|
|
||||||
import {DraggableScrollView} from './DraggableScrollView'
|
import {DraggableScrollView} from './DraggableScrollView'
|
||||||
|
|
||||||
export interface TabBarProps {
|
export interface TabBarProps {
|
||||||
@@ -137,15 +138,16 @@ export function TabBar({
|
|||||||
hoverStyle={pal.viewLight}
|
hoverStyle={pal.viewLight}
|
||||||
onPress={() => onPressItem(i)}>
|
onPress={() => onPressItem(i)}>
|
||||||
<View style={[styles.itemInner, selected && indicatorStyle]}>
|
<View style={[styles.itemInner, selected && indicatorStyle]}>
|
||||||
<Text
|
<NewText
|
||||||
type={isDesktop || isTablet ? 'xl-bold' : 'lg-bold'}
|
|
||||||
testID={testID ? `${testID}-${item}` : undefined}
|
testID={testID ? `${testID}-${item}` : undefined}
|
||||||
style={[
|
style={[
|
||||||
selected ? pal.text : pal.textLight,
|
selected ? pal.text : pal.textLight,
|
||||||
|
a.font_bold,
|
||||||
{lineHeight: 20},
|
{lineHeight: 20},
|
||||||
|
isDesktop || isTablet ? a.text_md : a.text_sm,
|
||||||
]}>
|
]}>
|
||||||
{item}
|
{item}
|
||||||
</Text>
|
</NewText>
|
||||||
</View>
|
</View>
|
||||||
</PressableWithHover>
|
</PressableWithHover>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user