一部stateのコンテキストへの移動、不要な要素の一斉消去、コンポーネントのファイル分離

This commit is contained in:
harukin-OneMix4
2023-12-15 00:32:58 +09:00
parent d6f727710f
commit 9306a9cb25
15 changed files with 418 additions and 434 deletions

19
lib/initIcon.js Normal file
View File

@@ -0,0 +1,19 @@
import React from "react";
import { Ionicons, AntDesign } from "@expo/vector-icons";
export const initIcon = (name, type) => {
switch (type) {
case "Ionicons":
return ({ focused, color, size }) => (
<Ionicons name={name} size={32} color={focused ? "#0099CC" : "black"} />
);
case "AntDesign":
return ({ focused, color, size }) => (
<AntDesign
name={name}
size={32}
color={focused ? "#0099CC" : "black"}
/>
);
}
};