bottom tab icons

This commit is contained in:
EthanShoeDev
2025-10-04 17:16:47 -04:00
parent cabc3bb55d
commit 65a5249c8f
2 changed files with 11 additions and 21 deletions

View File

@@ -1,4 +1,10 @@
import { Icon, Label, NativeTabs } from 'expo-router/unstable-native-tabs'; import { FontAwesome6, MaterialCommunityIcons } from '@expo/vector-icons';
import {
Icon,
Label,
NativeTabs,
VectorIcon,
} from 'expo-router/unstable-native-tabs';
import React from 'react'; import React from 'react';
import { useTheme } from '@/lib/theme'; import { useTheme } from '@/lib/theme';
@@ -24,16 +30,14 @@ export default function TabsLayout() {
<NativeTabs.Trigger name="index"> <NativeTabs.Trigger name="index">
<Label selectedStyle={{ color: theme.colors.textPrimary }}>Hosts</Label> <Label selectedStyle={{ color: theme.colors.textPrimary }}>Hosts</Label>
<Icon <Icon
src={<VectorIcon family={FontAwesome6} name="server" />}
selectedColor={theme.colors.textPrimary} selectedColor={theme.colors.textPrimary}
sf="house.fill"
drawable="ic_menu_myplaces"
/> />
</NativeTabs.Trigger> </NativeTabs.Trigger>
<NativeTabs.Trigger name="shell"> <NativeTabs.Trigger name="shell">
<Icon <Icon
src={<VectorIcon family={MaterialCommunityIcons} name="console" />}
selectedColor={theme.colors.textPrimary} selectedColor={theme.colors.textPrimary}
sf="gear"
drawable="ic_menu_compass"
/> />
<Label selectedStyle={{ color: theme.colors.textPrimary }}> <Label selectedStyle={{ color: theme.colors.textPrimary }}>
Shells Shells
@@ -41,9 +45,8 @@ export default function TabsLayout() {
</NativeTabs.Trigger> </NativeTabs.Trigger>
<NativeTabs.Trigger name="settings"> <NativeTabs.Trigger name="settings">
<Icon <Icon
src={<VectorIcon family={MaterialCommunityIcons} name="cog" />}
selectedColor={theme.colors.textPrimary} selectedColor={theme.colors.textPrimary}
sf="gear"
drawable="ic_menu_preferences"
/> />
<Label selectedStyle={{ color: theme.colors.textPrimary }}> <Label selectedStyle={{ color: theme.colors.textPrimary }}>
Settings Settings

View File

@@ -325,7 +325,6 @@ type KeyboardToolbarButtonPresetType =
| 'end' | 'end'
| 'pgup' | 'pgup'
| 'pgdn' | 'pgdn'
| 'fn'
| 'tab' | 'tab'
| 'ctrl' | 'ctrl'
| 'alt' | 'alt'
@@ -335,8 +334,7 @@ type KeyboardToolbarButtonPresetType =
| 'insert' | 'insert'
| 'delete' | 'delete'
| 'pageup' | 'pageup'
| 'pagedown' | 'pagedown';
| 'fn';
function KeyboardToolbarButtonPreset({ function KeyboardToolbarButtonPreset({
preset, preset,
@@ -356,12 +354,6 @@ type ModifierContract = {
orderPreference: number; orderPreference: number;
}; };
const noOpModifier: ModifierContract = {
canApplyModifierToBytes: (_) => false,
applyModifierToBytes: (bytes) => bytes,
orderPreference: 0,
};
const escapeByte = 27; const escapeByte = 27;
const ctrlModifier: ModifierContract = { const ctrlModifier: ModifierContract = {
@@ -426,11 +418,6 @@ const keyboardToolbarButtonPresetToProps: Record<
delete: { label: 'DELETE', sendBytes: new Uint8Array([27, 91, 51, 126]) }, delete: { label: 'DELETE', sendBytes: new Uint8Array([27, 91, 51, 126]) },
pageup: { label: 'PAGEUP', sendBytes: new Uint8Array([27, 91, 53, 126]) }, pageup: { label: 'PAGEUP', sendBytes: new Uint8Array([27, 91, 53, 126]) },
pagedown: { label: 'PAGEDOWN', sendBytes: new Uint8Array([27, 91, 54, 126]) }, pagedown: { label: 'PAGEDOWN', sendBytes: new Uint8Array([27, 91, 54, 126]) },
fn: {
label: 'FN',
type: 'modifier',
...noOpModifier,
},
ctrl: { label: 'CTRL', type: 'modifier', ...ctrlModifier }, ctrl: { label: 'CTRL', type: 'modifier', ...ctrlModifier },
alt: { label: 'ALT', type: 'modifier', ...altModifier }, alt: { label: 'ALT', type: 'modifier', ...altModifier },
}; };