1.0.8 • Published 12 months ago
@tylerhammer/notifications-template-preview-react-native v1.0.8
Notifications Template Preview - React Native
Usage
import {NotificationPreview} from '@sendbird/notifications-template-preview-react-native';
----
<NotificationPreview
globalTheme={globalSettings}
template={templates[item.notificationData.templateKey]}
notification={item}
themeMode="light"
customImageComponent={props => {
return (
<FastImage
style={{
...(!props.parsedProperties?.imageStyles.height ? {aspectRatio: 686 / 320} : null),
...props.parsedProperties?.imageStyles,
}}
source={{uri: props.imageUrl, priority: FastImage.priority.normal}}
resizeMode={props.parsedProperties?.resizeMode}
/>
);
}}
handlePress={props => {
switch (props.action?.type) {
case 'web': {
if (!props.action.data.startsWith('http://') || !props.action.data.startsWith('https://')) {
return Linking.openURL(`https://${props.action.data}`);
}
return Linking.openURL(props.action.data);
}
case 'uikit': {
return console.warn(props.action.data);
}
case 'custom': {
return;
}
}
}}
/>
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago
0.1.10
2 years ago
0.1.11
2 years ago
0.1.12
2 years ago
0.1.13
2 years ago
0.1.14
2 years ago
1.0.8
12 months ago
1.0.7
12 months ago
1.0.6
12 months ago
1.0.5
12 months ago
1.0.4
1 year ago
1.0.3
2 years ago
0.1.8
2 years ago
0.1.7
2 years ago
0.1.9
2 years ago
0.1.6
2 years ago
0.1.5
2 years ago
0.1.4
2 years ago
0.1.3
2 years ago
0.1.2
2 years ago
0.1.1
2 years ago
0.1.0
2 years ago