initIcon→tsx
This commit is contained in:
parent
5c41466920
commit
9ac41bc907
@ -1,7 +1,8 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { Ionicons, AntDesign } from "@expo/vector-icons";
|
import { Ionicons, AntDesign } from "@expo/vector-icons";
|
||||||
|
type name = keyof typeof Ionicons.glyphMap & keyof typeof AntDesign.glyphMap;
|
||||||
export const initIcon = (name, type) => {
|
type type = "Ionicons" | "AntDesign";
|
||||||
|
export const initIcon = (name: name, type:type) => {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "Ionicons":
|
case "Ionicons":
|
||||||
return ({ focused, color, size }) => (
|
return ({ focused, color, size }) => (
|
Loading…
Reference in New Issue
Block a user