initIcon→tsx

This commit is contained in:
harukin-expo-dev-env 2024-08-20 03:49:36 +00:00
parent 5c41466920
commit 9ac41bc907

View File

@ -1,7 +1,8 @@
import React from "react";
import { Ionicons, AntDesign } from "@expo/vector-icons";
export const initIcon = (name, type) => {
type name = keyof typeof Ionicons.glyphMap & keyof typeof AntDesign.glyphMap;
type type = "Ionicons" | "AntDesign";
export const initIcon = (name: name, type:type) => {
switch (type) {
case "Ionicons":
return ({ focused, color, size }) => (