MCPcopy Create free account
hub / github.com/Iterable/react-native-sdk / getIcon

Function getIcon

example/src/components/App/App.utils.tsx:4–24  ·  view source on GitHub ↗
(name: Route, props: Record<string, unknown>)

Source from the content-addressed store, hash-verified

2import type { Route } from '../../constants/routes';
3
4export const getIcon = (name: Route, props: Record<string, unknown>) => {
5 const { color, size = 25 } = props;
6
7 return (
8 <View style={{ height: size as number, width: size as number }}>
9 <Image
10 source={{ width: size as number, height: size as number, uri: name }}
11 tintColor={color as string}
12 resizeMode="contain"
13 style={{
14 width: size as number,
15 height: size as number,
16 }}
17 fadeDuration={0}
18 height={size as number}
19 width={size as number}
20 resizeMethod="scale"
21 />
22 </View>
23 );
24};

Callers 1

MainFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…