MCPcopy Create free account
hub / github.com/callstack/react-native-paper / loadIconModule

Function loadIconModule

src/components/MaterialCommunityIcon.tsx:40–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38 * Loads the appropriate icon module based on available dependencies
39 */
40const loadIconModule = () => {
41 try {
42 return require('@react-native-vector-icons/material-design-icons').default;
43 } catch (e) {
44 try {
45 return require('@expo/vector-icons/MaterialCommunityIcons').default;
46 } catch (e) {
47 try {
48 return require('react-native-vector-icons/MaterialCommunityIcons')
49 .default;
50 } catch (e) {
51 return null;
52 }
53 }
54 }
55};
56
57type IconModuleType = React.ComponentType<
58 React.ComponentProps<

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…