Socket
Socket
Sign inDemoInstall

@commercetools-uikit/notifications

Package Overview
Dependencies
99
Maintainers
3
Versions
775
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @commercetools-uikit/notifications

Notification components.


Version published
Weekly downloads
6.7K
decreased by-26.11%
Maintainers
3
Created
Weekly downloads
 

Readme

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

Last updated on 29 Apr 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc