are-message
Version:
This is a React global notification message component. It is a standalone implementation of the are-visual message component.
15 lines (13 loc) • 320 B
JavaScript
import { setDuration, setPrefixCls } from './index';
import { isTruthy } from '../types/types';
/**
* message 全局配置
*/
export function messageConfig(config) {
if (isTruthy(config.duration)) {
setDuration(config.duration);
}
if (isTruthy(config.prefixCls)) {
setPrefixCls(config.prefixCls);
}
}