Open Venugopal46 opened 6 years ago
Not for now. But you can always prepare some of the configuration objects and just use them in Alert calls like:
export const alertError = {
position: 'top-right',
timeout: 'none'
};
import { alertError } from './alertError';
Alert.error('Error msg', alertError);
But maybe this could be a good improvement, so let's leave it here for now.
Hi! Сan I do this?
export const Notification = {
success: (msg, params) => {
Alert.success(msg, { ...params });
},
info: (msg, params) => {
Alert.info(msg, { ...params });
},
error: (msg, params) => {
Alert.info(msg, { ...params });
},
warning: (msg, params) => {
Alert.warning(msg, { ...params });
}
};
and then
Notification.success("test", {
position: "top-right",
beep: false,
timeout: "none",
offset: 100
});
Is there a way to set different global configuration for different types of alert? like this
remaining options will be set to defaults.