notification

import { Notification } from "woly";

Notification display the notification message globaly.

Example

Your transaction has been completed
<Playground>
  <State initial={false} change={(i) => !i}>
    {(value, change) => (
      <block.S>
        <Button
          onClick={change}
          text={value ? 'hide notification' : 'show notification'}
          priority="primary"
        />
        <div style={{ display: value ? 'block' : 'none' }}>
          <Notification message="Your transaction has been completed" priority="primary" />
        </div>
      </block.S>
    )}
  </State>
</Playground>

Kinds

NameDescription
NotificationBase notification. Useful for creating a new kind of notificaiton

Props

NameTypeDefaultDescription
messageReact.ReactNodeMessage that will be shown in notification
prioritystring'secondary'Priority prop to style Notification component