= () => {
const dispatch = useNotification();
const handleNewNotification = (
type: notifyType,
icon?: TIconType,
position?: IPosition,
) => {
dispatch({
type,
message: 'Somebody messaged you',
title: 'New Notification',
icon,
position: position || 'topR',
});
};
return (
<>
Types:
Position:
handleNewNotification('success', undefined, 'bottomL')
}
isFullWidth={true}
theme="primary"
/>
handleNewNotification('success', undefined, 'bottomR')
}
isFullWidth={true}
theme="primary"
/>
handleNewNotification('success', undefined, 'topL')
}
isFullWidth={true}
theme="primary"
/>
>
);
};
export const hookDemo = HookTemplate.bind({});
export const Regular = Template.bind({});
Regular.args = {
id: 'test-Notification',
message: 'Somebody messaged you',
title: 'New Notification',
};
export const Standard = Template.bind({});
Standard.args = {
message: 'Kresimir: Thank you for sharin..',
};
export const CustomIcon = Template.bind({});
CustomIcon.args = {
icon: iconTypes.cloud,
message: 'TX: 0x2134...e82c5',
title: 'New Event Sync',
};