({ name, color, size, ...rest }: IconProps)
| 70 | * Fallback component displayed when no icon library is available |
| 71 | */ |
| 72 | const 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 | |
| 93 | const MaterialCommunityIcons: IconModuleType = IconModule || FallbackIcon; |
| 94 |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…