0.1.0 • Published 12 months ago

@talixo/notification v0.1.0

Weekly downloads
8
License
MIT
Repository
github
Last release
12 months ago

Talixo Notification

UI Component which represents Notification

How to install

Package is available as @talixo/notification in NPM registry so you can use it in your project using npm install @talixo/notification --save or yarn add @talixo/notification.

Requirements

Your package should additionally have some extra dependencies:

  • @talixo/icon: ^0.1.1
  • @talixo/shared: ^0.1.0
  • prop-types: ^15.6.1
  • react: ^16.2.0
  • react-dom: ^16.2.0
  • react-transition-group: ^2.2.1

These packages are required by @talixo/notification, but you have to install them manually, to avoid having different versions of these in your application.

Supported props

Notification

It allows any props which are allowed for div. Additionally, it handles some differently:

Property nameTypeDefaultDescription
classNamestringn/aAdditional class name passed to wrapper
childrennoden/aNotification content
classNamestringn/aAdditional class name passed to notification
onClosefunctionn/aFunction that runs when close button is clicked
typeNotificationTypen/aNotification variant

NotificationList

It allows any props which are allowed for div.

Additionally, it handles some differently:

Property nameTypeDefaultDescription
classNamestringn/aAdditional class name passed to wrapper
itemsNotificationItem[]n/alist of notifications to show
autoCloseboolfalseshould it manage closing notifications by itself?
stickyboolfalseshould it be sticked to screen?
horizontalHorizontalPositionstarthorizontal position of sticked list (RTL aware)
verticalVerticalPositionbottomvertical position of sticked list

Types

Enums

Enum nameEnum options
NotificationType'toast', 'primary', 'secondary', 'tertiary', 'success', 'error', 'warning', 'info'
HorizontalPositionstart, center, end
VerticalPositiontop, bottom

NotificationItem

Item which should be shown in NotificationList accept all Notification properties, except children (renamed to content):

Property nameTypeDefaultDescription
classNamestringn/aAdditional class name passed to wrapper
contentnoden/aNotification content
classNamestringn/aAdditional class name passed to notification
onClosefunctionn/aFunction that runs when close button is clicked
typeNotificationTypen/aNotification variant

Changelog

  • 0.1.0 - initial version
1.0.0-alpha.38

12 months ago

1.0.0-alpha.37

12 months ago

1.0.0-alpha.36

5 years ago

1.0.0-alpha.35

5 years ago

1.0.0-alpha.31

6 years ago

1.0.0-alpha.30

6 years ago

1.0.0-alpha.27

6 years ago

1.0.0-alpha.24

6 years ago

1.0.0-alpha.20

6 years ago

1.0.0-alpha.19

6 years ago

1.0.0-alpha.16

6 years ago

1.0.0-alpha.12

6 years ago

1.0.0-alpha.7

6 years ago

1.0.0-alpha.6

6 years ago

1.0.0-alpha.5

6 years ago

1.0.0-alpha.4

6 years ago

1.0.0-alpha.2

6 years ago

0.1.0

6 years ago