How to use the @commercetools-frontend/constants.NOTIFICATION_KINDS_SIDE.info function in @commercetools-frontend/constants

To help you get started, we’ve selected a few @commercetools-frontend/constants 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 commercetools / merchant-center-application-kit / packages / react-notifications / src / components / notification / notification.tsx View on Github external
const NotificationIcon = (props: PropsIcon) => {
  if (props.type === NOTIFICATION_KINDS_SIDE.error)
    return ;
  if (props.type === NOTIFICATION_KINDS_SIDE.info)
    return ;
  if (props.type === NOTIFICATION_KINDS_SIDE.warning)
    return ;

  return ;
};
NotificationIcon.displayName = 'NotificationIcon';
github commercetools / merchant-center-application-kit / packages / react-notifications / src / components / notification / notification.styles.ts View on Github external
const getColorByType = (value: TAppNotificationKind) => {
  switch (value) {
    case NOTIFICATION_KINDS_SIDE.success:
      return customProperties.colorPrimary;
    case NOTIFICATION_KINDS_SIDE.info:
      return customProperties.colorInfo;
    case NOTIFICATION_KINDS_SIDE.error:
      return customProperties.colorError;
    case NOTIFICATION_KINDS_SIDE.warning:
      return customProperties.colorWarning;
    default:
      return 'transparent';
  }
};
github commercetools / merchant-center-application-kit / packages / react-notifications / src / components / notifications-list / notifications-list.tsx View on Github external
if (CustomNotificationComponent) {
          return (
             {
                dispatch(removeNotification(notification.id));
              }}
            />
          );
        }

        switch (notification.kind) {
          case NOTIFICATION_KINDS_SIDE.error:
          case NOTIFICATION_KINDS_SIDE.warning:
          case NOTIFICATION_KINDS_SIDE.info:
          case NOTIFICATION_KINDS_SIDE.success:
            return (
               {
                  dispatch(removeNotification(notification.id));
                }}
              />
            );
          default:
            return null;
        }
      })}

@commercetools-frontend/constants

Shared constants for MC applications

MIT
Latest version published 3 days ago

Package Health Score

87 / 100
Full package analysis