JSPM

@workday/canvas-kit-react-banner

5.0.0-beta.1-next.6+33758d4b
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 21
  • Score
    100M100P100Q75031F
  • License Apache-2.0

Common Canvas banner component for React

Package Exports

  • @workday/canvas-kit-react-banner

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@workday/canvas-kit-react-banner) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Canvas Kit Banner

Errors and Alerts notify users of missteps that happen within a workflow and describe how the user can take appropriate action to resolve them.

> Workday Design Reference

Installation

yarn add @workday/canvas-kit-react

or

yarn add @workday/canvas-kit-react-banner

Usage

import Banner from '@workday/canvas-kit-react-banner';

<Banner label="3 errors" />;

Static Properties

ErrorType: ErrorType

<Banner error={Banner.ErrorType.Error} label="3 errors" />

Variant: BannerVariant

<Banner variant={Banner.Variant.Sticky} label="3 errors" />

Component Props

Required

label: String

Label of the banner

Optional

onClick: (e: React.MouseEvent<HTMLButtonElement>) => void

Function called when the user click on the banner

variant: BannerVariant

Set the banner variant as full or sticky

Default: BannerVariant.Full

error: ErrorType

Set the banner type as alert or error

Default: ErrorType.Alert

actionText: string

Set the action text in the full variant

Default: 'View All'