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

Function DefaultIcon

src/components/MaterialCommunityIcon.tsx:98–125  ·  view source on GitHub ↗
({
  name,
  color = black,
  size,
  direction,
  allowFontScaling,
  testID,
}: IconProps)

Source from the content-addressed store, hash-verified

96 * Default icon component that handles icon rendering with proper styling and accessibility
97 */
98const DefaultIcon = ({
99 name,
100 color = black,
101 size,
102 direction,
103 allowFontScaling,
104 testID,
105}: IconProps) => {
106 return (
107 <MaterialCommunityIcons
108 allowFontScaling={allowFontScaling}
109 name={name}
110 color={color}
111 size={size}
112 style={[
113 {
114 transform: [{ scaleX: direction === 'rtl' ? -1 : 1 }],
115 lineHeight: size,
116 },
117 styles.icon,
118 ]}
119 pointerEvents="none"
120 selectable={false}
121 testID={testID}
122 {...accessibilityProps}
123 />
124 );
125};
126
127const styles = StyleSheet.create({
128 // eslint-disable-next-line react-native/no-color-literals

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…