1.0.8 • Published 11 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
1 year ago
1.0.1
1 year ago
1.0.0
1 year ago
0.1.10
1 year ago
0.1.11
1 year ago
0.1.12
1 year ago
0.1.13
1 year ago
0.1.14
1 year ago
1.0.8
11 months ago
1.0.7
11 months ago
1.0.6
11 months ago
1.0.5
11 months ago
1.0.4
1 year ago
1.0.3
1 year ago
0.1.8
1 year ago
0.1.7
1 year ago
0.1.9
1 year ago
0.1.6
1 year ago
0.1.5
1 year ago
0.1.4
1 year ago
0.1.3
1 year ago
0.1.2
1 year ago
0.1.1
1 year ago
0.1.0
1 year ago