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

Function FallbackIcon

src/components/MaterialCommunityIcon.tsx:72–91  ·  view source on GitHub ↗
({ name, color, size, ...rest }: IconProps)

Source from the content-addressed store, hash-verified

70 * Fallback component displayed when no icon library is available
71 */
72const FallbackIcon = ({ name, color, size, ...rest }: IconProps) => {
73 console.warn(
74 `Tried to use the icon '${name}' in a component from 'react-native-paper', but none of the required icon libraries are installed.`,
75 `To fix this, please install one of the following:\n` +
76 `- @expo/vector-icons\n` +
77 `- @react-native-vector-icons/material-design-icons\n` +
78 `- react-native-vector-icons\n\n` +
79 `You can also use another method to specify icon: https://callstack.github.io/react-native-paper/docs/guides/icons`
80 );
81
82 return (
83 <Text
84 {...rest}
85 style={[styles.icon, { color, fontSize: size }]}
86 selectable={false}
87 >
88
89 </Text>
90 );
91};
92
93const MaterialCommunityIcons: IconModuleType = IconModule || FallbackIcon;
94

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…