Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@commercetools-uikit/notifications

Package Overview
Dependencies
Maintainers
3
Versions
874
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commercetools-uikit/notifications

Notification components.

  • 0.0.0-canary-20240917143329
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.7K
decreased by-64.66%
Maintainers
3
Weekly downloads
 
Created
Source

Notifications

Description

Notification components.

Installation

yarn add @commercetools-uikit/notifications
npm --save install @commercetools-uikit/notifications

Additionally install the peer dependencies (if not present)

yarn add react react-intl
npm --save install react react-intl

Usage

import { ContentNotification } from '@commercetools-uikit/notifications';

export const Success = () => (
  <ContentNotification type="success">
    This is an success message
  </ContentNotification>
);
export const Info = () => (
  <ContentNotification type="info">This is an info message</ContentNotification>
);
export const Warning = () => (
  <ContentNotification type="warning">
    This is an warning message
  </ContentNotification>
);
export const Error = () => (
  <ContentNotification type="error">
    This is an error message
  </ContentNotification>
);

ContentNotification

Properties

PropsTypeRequiredDefaultDescription
typeunion
Possible values:
'error' , 'info' , 'warning' , 'success'
Determines the color/type of notification.
intlMessageMessageDescriptorAn intl message object that will be rendered with FormattedMessage.
Required if children is not provided.
childrenReactNodeThe content of the notification.
Required if intlMessage is not provided.
onRemoveFunction
See signature.
When provided, a close icon will be rendered and this callback will be called when it is clicked.

Signatures

Signature onRemove

(
  event: MouseEvent<HTMLElement> | KeyboardEvent<HTMLElement>
) => void

Keywords

FAQs

Package last updated on 17 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc