Socket
Socket
Sign inDemoInstall

@workday/canvas-kit-react-banner

Package Overview
Dependencies
81
Maintainers
6
Versions
300
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @workday/canvas-kit-react-banner

Common Canvas banner component for React


Version published
Weekly downloads
2.1K
decreased by-30.44%
Maintainers
6
Install size
12.0 MB
Created
Weekly downloads
ย 

Readme

Source

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'

Keywords

FAQs

Last updated on 09 Jul 2021

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with โšก๏ธ by Socket Inc