How to use rc-notification - 7 common examples

To help you get started, we’ve selected a few rc-notification examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ant-design / ant-design / components / message / index.tsx View on Github external
function getMessageInstance(callback: (i: any) => void) {
  if (messageInstance) {
    callback(messageInstance);
    return;
  }
  Notification.newInstance(
    {
      prefixCls,
      transitionName,
      style: { top: defaultTop }, // 覆盖原来的样式
      getContainer,
      maxCount,
    },
    (instance: any) => {
      if (messageInstance) {
        callback(messageInstance);
        return;
      }
      messageInstance = instance;
      callback(instance);
    },
  );
github ziaochina / mk-demo / node_modules / antd / es / message / index.js View on Github external
function getMessageInstance() {
    messageInstance = messageInstance || Notification.newInstance({
        prefixCls: prefixCls,
        transitionName: 'move-up',
        style: { top: defaultTop },
        getContainer: getContainer
    });
    return messageInstance;
}
function notice(content) {
github godaner / vm-engine / vm-backend / src / main / resources / static / node_modules / antd / es / message / index.js View on Github external
function getMessageInstance() {
    messageInstance = messageInstance || Notification.newInstance({
        prefixCls: prefixCls,
        transitionName: 'move-up',
        style: { top: defaultTop },
        getContainer: getContainer
    });
    return messageInstance;
}
function notice(content) {
github react-design / react-ui / src / components / message / index.js View on Github external
import Notification from 'rc-notification';
import * as React from 'react';

const defaultDuration = 1.5;
let key = 1;

const notification = Notification.newInstance({
	prefixCls : 'f-message',
    transitionName: 'move-up',
	style : {top:'20px' ,left:'50%'}
});

const notificationBlock = Notification.newInstance({
    prefixCls : 'f-message-block',
    transitionName: 'move-up',
    style : {top:'150px' ,left:'50%'}
});

function notice (mes , duration = defaultDuration ,showType = 'tips' ,type ,icon){
    let param = {
        key,
        content: <div>
            <span></span></div>
github yinxin630 / fiora / client / components / Message.jsx View on Github external
function showMessage(text, duration = 1.5, type = 'success') {
    Notification.newInstance({}, (notification) =&gt; {
        notification.notice({
            content: (
                <div>
                    <i>
                    <span>{text}</span>
                </i></div><i>
            ),
            duration,
        });
    });
}
</i>
github aermin / ghChat / src / components / Notification / index.js View on Github external
export default function notification(msg, type, duration) {
  const content = addIcon(msg, type);
  Notification.newInstance({}, (notification) => {
    notification.notice({
      content,
      duration
    });
  });
}

rc-notification

notification ui component for react

MIT
Latest version published 3 months ago

Package Health Score

86 / 100
Full package analysis

Popular rc-notification functions