furl
Getting startedDesignComponents
Design
Design GuidelinesTypography SystemLayout SystemColor palettesCustomization
Components
ComponentsAccordionAlertAnchorAudioAvatarBadgeBreadcrumbsButtonButtonGroupCalendarCardCollapseContextButtonDividerDropdownFooterFormGraphGridHyperlinkIconIframeImageInputItemLayoutListLoaderMediaObjectMenuModalNotificationPaginationPopoverProgressSearchStepsSwitchTableTabsTooltipTypographyVideo

Notification

Notifications inform or alert users about important events.

Examples

import React from 'react';
import ReactDOM from 'react-dom';
import { Notification, NotificationCenter, Button } from 'furl-components';

const notificationCenterRef = React.createRef();

ReactDOM.render(
  <div>
    <NotificationCenter 
      ref={notificationCenterRef} 
      verticalPosition='top' 
      horizontalPosition='right' 
    />
    <Button onClick={() => notificationCenterRef.current.addNotification(
      <Notification color='primary' size='large' textAlign='left'>
        This is an important notification.
      </Notification>
    )}>Add notification
    </Button>
  </div>, 
  document.getElementById('root')
);

API

NotificationCenter props
Property Description Type Default
ref notification center ref React Ref
verticalPosition notification center vertical position string 'bottom'
horizontalPosition notification center horizontal position string 'right'
NotificationCenter ref methods
Method Description
addNotification() add a notification to the notification center
Notification props
Property Description Type Default
color notification color string 'plain'
size notification size string 'normal'
textAlign notification text alignment string 'center'

Notes

  • It is highly recommended to provide a ref for your NotificationCenter via the use of React.createRef(). NotificationCenter should only be used once in your app and it should be reused via ref.current for multiple modal dialogs.
  • A NotificationCenter only accepts children of the Notification component type, set either normally or via the addNotification method.
  • verticalPosition can be one of the following: 'top', 'centerr' or 'bottom'.
  • horizontalPosition can be one of the following: 'left', 'center' or 'right'.
  • color can be any of the predefined color palettes ('plain', 'primary', 'secondary', 'success', 'warning' or 'danger').
  • size can be one of the following: 'small', 'normal' or 'large'.
  • textAlign can be one of the following: 'left', 'center' or 'right'.

furl was designed and developed by Angelos Chalaris © 2019
Documentation generated using Gatsby, hosting by Netlify