0.1.0 • Published 3 years ago

@talixo/notification v0.1.0

Weekly downloads
8
License
MIT
Repository
github
Last release
3 years 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.36

3 years ago

1.0.0-alpha.35

3 years ago

1.0.0-alpha.31

3 years ago

1.0.0-alpha.30

3 years ago

1.0.0-alpha.27

3 years ago

1.0.0-alpha.24

3 years ago

1.0.0-alpha.20

4 years ago

1.0.0-alpha.19

4 years ago

1.0.0-alpha.16

4 years ago

1.0.0-alpha.12

4 years ago

1.0.0-alpha.7

4 years ago

1.0.0-alpha.6

4 years ago

1.0.0-alpha.5

4 years ago

1.0.0-alpha.4

4 years ago

1.0.0-alpha.2

4 years ago

0.1.0

4 years ago