|
1 | | -import { |
2 | | - IconAdjustmentsHorizontal, |
3 | | - IconAlertCircle, |
4 | | - IconAlertTriangle, |
5 | | - IconApps, |
6 | | - IconArchive, |
7 | | - IconArrowBackUp, |
8 | | - IconArrowDownCircle, |
9 | | - IconArrowRightCircle, |
10 | | - IconArrowUp, |
11 | | - IconArrowUpCircle, |
12 | | - IconArrowUpRight, |
13 | | - IconArrowUpRightCircle, |
14 | | - IconArrowsMaximize, |
15 | | - IconBellRinging, |
16 | | - IconBolt, |
17 | | - IconBox, |
18 | | - IconCamera, |
19 | | - IconChartBar, |
20 | | - IconCheck, |
21 | | - IconChevronDown, |
22 | | - IconCode, |
23 | | - IconChevronLeft, |
24 | | - IconChevronRight, |
25 | | - IconChevronUp, |
26 | | - IconCircleCheck, |
27 | | - IconCircleXFilled, |
28 | | - IconClock, |
29 | | - IconCopy, |
30 | | - IconDeviceDesktop, |
31 | | - IconDots, |
32 | | - IconDotsCircleHorizontal, |
33 | | - IconEdit, |
34 | | - IconExternalLink, |
35 | | - IconEye, |
36 | | - IconFileText, |
37 | | - IconFilter, |
38 | | - IconFolder, |
39 | | - IconFolderOpen, |
40 | | - IconFolderPlus, |
41 | | - IconGitBranch, |
42 | | - IconHammer, |
43 | | - IconGitMerge, |
44 | | - IconGitPullRequest, |
45 | | - IconInfoCircle, |
46 | | - IconKeyboard, |
47 | | - IconKeyboardHide, |
48 | | - IconLayoutColumns, |
49 | | - IconLayoutSidebar, |
50 | | - IconLetterSpacing, |
51 | | - IconLink, |
52 | | - IconMessage, |
53 | | - IconMinus, |
54 | | - IconMoon, |
55 | | - IconNetwork, |
56 | | - IconPalette, |
57 | | - IconPin, |
58 | | - IconPinnedOff, |
59 | | - IconPlayerPlay, |
60 | | - IconPlayerStopFilled, |
61 | | - IconPlus, |
62 | | - IconQrcode, |
63 | | - IconRefresh, |
64 | | - IconSearch, |
65 | | - IconServer, |
66 | | - IconSettings, |
67 | | - IconSparkles, |
68 | | - IconSun, |
69 | | - IconLayoutSidebarRight, |
70 | | - IconTerminal2, |
71 | | - IconTextDecrease, |
72 | | - IconTextIncrease, |
73 | | - IconTool, |
74 | | - IconTrash, |
75 | | - IconTypography, |
76 | | - IconUserCircle, |
77 | | - IconWifiOff, |
78 | | - IconWorld, |
79 | | - IconX, |
80 | | - type Icon, |
81 | | -} from "@tabler/icons-react-native"; |
82 | | -import { Platform } from "react-native"; |
83 | | -import { SymbolView as ExpoSymbolView, type SFSymbol, type SymbolViewProps } from "expo-symbols"; |
| 1 | +import type { Icon } from "@tabler/icons-react-native/types"; |
| 2 | +/* |
| 3 | + * Keep these as per-icon exports. Importing the package root eagerly registers |
| 4 | + * the entire Tabler icon set in Metro. |
| 5 | + */ |
| 6 | +import IconAdjustmentsHorizontal from "@tabler/icons-react-native/IconAdjustmentsHorizontal"; |
| 7 | +import IconAlertCircle from "@tabler/icons-react-native/IconAlertCircle"; |
| 8 | +import IconAlertTriangle from "@tabler/icons-react-native/IconAlertTriangle"; |
| 9 | +import IconApps from "@tabler/icons-react-native/IconApps"; |
| 10 | +import IconArchive from "@tabler/icons-react-native/IconArchive"; |
| 11 | +import IconArrowBackUp from "@tabler/icons-react-native/IconArrowBackUp"; |
| 12 | +import IconArrowDownCircle from "@tabler/icons-react-native/IconArrowDownCircle"; |
| 13 | +import IconArrowRightCircle from "@tabler/icons-react-native/IconArrowRightCircle"; |
| 14 | +import IconArrowUp from "@tabler/icons-react-native/IconArrowUp"; |
| 15 | +import IconArrowUpCircle from "@tabler/icons-react-native/IconArrowUpCircle"; |
| 16 | +import IconArrowUpRight from "@tabler/icons-react-native/IconArrowUpRight"; |
| 17 | +import IconArrowUpRightCircle from "@tabler/icons-react-native/IconArrowUpRightCircle"; |
| 18 | +import IconArrowsMaximize from "@tabler/icons-react-native/IconArrowsMaximize"; |
| 19 | +import IconBellRinging from "@tabler/icons-react-native/IconBellRinging"; |
| 20 | +import IconBolt from "@tabler/icons-react-native/IconBolt"; |
| 21 | +import IconBox from "@tabler/icons-react-native/IconBox"; |
| 22 | +import IconCamera from "@tabler/icons-react-native/IconCamera"; |
| 23 | +import IconChartBar from "@tabler/icons-react-native/IconChartBar"; |
| 24 | +import IconCheck from "@tabler/icons-react-native/IconCheck"; |
| 25 | +import IconChevronDown from "@tabler/icons-react-native/IconChevronDown"; |
| 26 | +import IconChevronLeft from "@tabler/icons-react-native/IconChevronLeft"; |
| 27 | +import IconChevronRight from "@tabler/icons-react-native/IconChevronRight"; |
| 28 | +import IconChevronUp from "@tabler/icons-react-native/IconChevronUp"; |
| 29 | +import IconCircleCheck from "@tabler/icons-react-native/IconCircleCheck"; |
| 30 | +import IconCircleXFilled from "@tabler/icons-react-native/IconCircleXFilled"; |
| 31 | +import IconClock from "@tabler/icons-react-native/IconClock"; |
| 32 | +import IconCode from "@tabler/icons-react-native/IconCode"; |
| 33 | +import IconCopy from "@tabler/icons-react-native/IconCopy"; |
| 34 | +import IconDeviceDesktop from "@tabler/icons-react-native/IconDeviceDesktop"; |
| 35 | +import IconDots from "@tabler/icons-react-native/IconDots"; |
| 36 | +import IconDotsCircleHorizontal from "@tabler/icons-react-native/IconDotsCircleHorizontal"; |
| 37 | +import IconEdit from "@tabler/icons-react-native/IconEdit"; |
| 38 | +import IconExternalLink from "@tabler/icons-react-native/IconExternalLink"; |
| 39 | +import IconEye from "@tabler/icons-react-native/IconEye"; |
| 40 | +import IconFileText from "@tabler/icons-react-native/IconFileText"; |
| 41 | +import IconFilter from "@tabler/icons-react-native/IconFilter"; |
| 42 | +import IconFolder from "@tabler/icons-react-native/IconFolder"; |
| 43 | +import IconFolderOpen from "@tabler/icons-react-native/IconFolderOpen"; |
| 44 | +import IconFolderPlus from "@tabler/icons-react-native/IconFolderPlus"; |
| 45 | +import IconGitBranch from "@tabler/icons-react-native/IconGitBranch"; |
| 46 | +import IconGitMerge from "@tabler/icons-react-native/IconGitMerge"; |
| 47 | +import IconGitPullRequest from "@tabler/icons-react-native/IconGitPullRequest"; |
| 48 | +import IconHammer from "@tabler/icons-react-native/IconHammer"; |
| 49 | +import IconInfoCircle from "@tabler/icons-react-native/IconInfoCircle"; |
| 50 | +import IconKeyboard from "@tabler/icons-react-native/IconKeyboard"; |
| 51 | +import IconKeyboardHide from "@tabler/icons-react-native/IconKeyboardHide"; |
| 52 | +import IconLayoutColumns from "@tabler/icons-react-native/IconLayoutColumns"; |
| 53 | +import IconLayoutSidebar from "@tabler/icons-react-native/IconLayoutSidebar"; |
| 54 | +import IconLayoutSidebarRight from "@tabler/icons-react-native/IconLayoutSidebarRight"; |
| 55 | +import IconLetterSpacing from "@tabler/icons-react-native/IconLetterSpacing"; |
| 56 | +import IconLink from "@tabler/icons-react-native/IconLink"; |
| 57 | +import IconMessage from "@tabler/icons-react-native/IconMessage"; |
| 58 | +import IconMinus from "@tabler/icons-react-native/IconMinus"; |
| 59 | +import IconMoon from "@tabler/icons-react-native/IconMoon"; |
| 60 | +import IconNetwork from "@tabler/icons-react-native/IconNetwork"; |
| 61 | +import IconPalette from "@tabler/icons-react-native/IconPalette"; |
| 62 | +import IconPin from "@tabler/icons-react-native/IconPin"; |
| 63 | +import IconPinnedOff from "@tabler/icons-react-native/IconPinnedOff"; |
| 64 | +import IconPlayerPlay from "@tabler/icons-react-native/IconPlayerPlay"; |
| 65 | +import IconPlayerStopFilled from "@tabler/icons-react-native/IconPlayerStopFilled"; |
| 66 | +import IconPlus from "@tabler/icons-react-native/IconPlus"; |
| 67 | +import IconQrcode from "@tabler/icons-react-native/IconQrcode"; |
| 68 | +import IconRefresh from "@tabler/icons-react-native/IconRefresh"; |
| 69 | +import IconSearch from "@tabler/icons-react-native/IconSearch"; |
| 70 | +import IconServer from "@tabler/icons-react-native/IconServer"; |
| 71 | +import IconSettings from "@tabler/icons-react-native/IconSettings"; |
| 72 | +import IconSparkles from "@tabler/icons-react-native/IconSparkles"; |
| 73 | +import IconSun from "@tabler/icons-react-native/IconSun"; |
| 74 | +import IconTerminal2 from "@tabler/icons-react-native/IconTerminal2"; |
| 75 | +import IconTextDecrease from "@tabler/icons-react-native/IconTextDecrease"; |
| 76 | +import IconTextIncrease from "@tabler/icons-react-native/IconTextIncrease"; |
| 77 | +import IconTool from "@tabler/icons-react-native/IconTool"; |
| 78 | +import IconTrash from "@tabler/icons-react-native/IconTrash"; |
| 79 | +import IconTypography from "@tabler/icons-react-native/IconTypography"; |
| 80 | +import IconUserCircle from "@tabler/icons-react-native/IconUserCircle"; |
| 81 | +import IconWifiOff from "@tabler/icons-react-native/IconWifiOff"; |
| 82 | +import IconWorld from "@tabler/icons-react-native/IconWorld"; |
| 83 | +import IconX from "@tabler/icons-react-native/IconX"; |
| 84 | +import type { SFSymbol, SymbolViewProps } from "expo-symbols"; |
84 | 85 | import { withUniwind } from "uniwind"; |
85 | 86 |
|
86 | 87 | const ANDROID_ICON_BY_SF_SYMBOL: Partial<Record<SFSymbol, Icon>> = { |
@@ -192,10 +193,6 @@ export type { SFSymbol } from "expo-symbols"; |
192 | 193 | export type AppSymbolName = SymbolViewProps["name"]; |
193 | 194 |
|
194 | 195 | function AppSymbolView(props: SymbolViewProps) { |
195 | | - if (Platform.OS !== "android") { |
196 | | - return <ExpoSymbolView {...props} />; |
197 | | - } |
198 | | - |
199 | 196 | const materialName = typeof props.name === "string" ? undefined : props.name.android; |
200 | 197 | const sfSymbol = typeof props.name === "string" ? props.name : props.name.ios; |
201 | 198 | const AndroidIcon = |
|
0 commit comments