mirror of
https://github.com/EthanShoeDev/fressh.git
synced 2026-01-11 06:12:51 +00:00
bottom tab icons
This commit is contained in:
@@ -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 { useTheme } from '@/lib/theme';
|
||||
|
||||
@@ -24,16 +30,14 @@ export default function TabsLayout() {
|
||||
<NativeTabs.Trigger name="index">
|
||||
<Label selectedStyle={{ color: theme.colors.textPrimary }}>Hosts</Label>
|
||||
<Icon
|
||||
src={<VectorIcon family={FontAwesome6} name="server" />}
|
||||
selectedColor={theme.colors.textPrimary}
|
||||
sf="house.fill"
|
||||
drawable="ic_menu_myplaces"
|
||||
/>
|
||||
</NativeTabs.Trigger>
|
||||
<NativeTabs.Trigger name="shell">
|
||||
<Icon
|
||||
src={<VectorIcon family={MaterialCommunityIcons} name="console" />}
|
||||
selectedColor={theme.colors.textPrimary}
|
||||
sf="gear"
|
||||
drawable="ic_menu_compass"
|
||||
/>
|
||||
<Label selectedStyle={{ color: theme.colors.textPrimary }}>
|
||||
Shells
|
||||
@@ -41,9 +45,8 @@ export default function TabsLayout() {
|
||||
</NativeTabs.Trigger>
|
||||
<NativeTabs.Trigger name="settings">
|
||||
<Icon
|
||||
src={<VectorIcon family={MaterialCommunityIcons} name="cog" />}
|
||||
selectedColor={theme.colors.textPrimary}
|
||||
sf="gear"
|
||||
drawable="ic_menu_preferences"
|
||||
/>
|
||||
<Label selectedStyle={{ color: theme.colors.textPrimary }}>
|
||||
Settings
|
||||
|
||||
@@ -325,7 +325,6 @@ type KeyboardToolbarButtonPresetType =
|
||||
| 'end'
|
||||
| 'pgup'
|
||||
| 'pgdn'
|
||||
| 'fn'
|
||||
| 'tab'
|
||||
| 'ctrl'
|
||||
| 'alt'
|
||||
@@ -335,8 +334,7 @@ type KeyboardToolbarButtonPresetType =
|
||||
| 'insert'
|
||||
| 'delete'
|
||||
| 'pageup'
|
||||
| 'pagedown'
|
||||
| 'fn';
|
||||
| 'pagedown';
|
||||
|
||||
function KeyboardToolbarButtonPreset({
|
||||
preset,
|
||||
@@ -356,12 +354,6 @@ type ModifierContract = {
|
||||
orderPreference: number;
|
||||
};
|
||||
|
||||
const noOpModifier: ModifierContract = {
|
||||
canApplyModifierToBytes: (_) => false,
|
||||
applyModifierToBytes: (bytes) => bytes,
|
||||
orderPreference: 0,
|
||||
};
|
||||
|
||||
const escapeByte = 27;
|
||||
|
||||
const ctrlModifier: ModifierContract = {
|
||||
@@ -426,11 +418,6 @@ const keyboardToolbarButtonPresetToProps: Record<
|
||||
delete: { label: 'DELETE', sendBytes: new Uint8Array([27, 91, 51, 126]) },
|
||||
pageup: { label: 'PAGEUP', sendBytes: new Uint8Array([27, 91, 53, 126]) },
|
||||
pagedown: { label: 'PAGEDOWN', sendBytes: new Uint8Array([27, 91, 54, 126]) },
|
||||
fn: {
|
||||
label: 'FN',
|
||||
type: 'modifier',
|
||||
...noOpModifier,
|
||||
},
|
||||
ctrl: { label: 'CTRL', type: 'modifier', ...ctrlModifier },
|
||||
alt: { label: 'ALT', type: 'modifier', ...altModifier },
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user