Pretty up code. Add all my default stuff that I like

This commit is contained in:
2025-01-28 10:17:33 -06:00
parent 5a821fc6b5
commit 0dfb7f190d
20 changed files with 191 additions and 182 deletions

View File

@ -3,7 +3,7 @@
import MaterialIcons from '@expo/vector-icons/MaterialIcons';
import { SymbolWeight } from 'expo-symbols';
import React from 'react';
import { OpaqueColorValue, StyleProp, ViewStyle } from 'react-native';
import { OpaqueColorValue, StyleProp, TextStyle } from 'react-native';
// Add your SFSymbol to MaterialIcons mappings here.
const MAPPING = {
@ -27,7 +27,7 @@ export type IconSymbolName = keyof typeof MAPPING;
*
* Icon `name`s are based on SFSymbols and require manual mapping to MaterialIcons.
*/
export function IconSymbol({
export const IconSymbol = ({
name,
size = 24,
color,
@ -36,8 +36,8 @@ export function IconSymbol({
name: IconSymbolName;
size?: number;
color: string | OpaqueColorValue;
style?: StyleProp<ViewStyle>;
style?: StyleProp<TextStyle>;
weight?: SymbolWeight;
}) {
}) => {
return <MaterialIcons color={color} size={size} name={MAPPING[name]} style={style} />;
}
};