@leafygreen-ui/banner
leafyGreen UI Kit Banner
Last updated 5 days ago by brookescarlett .
Apache-2.0 · Original npm · Tarball · package.json
$ cnpm install @leafygreen-ui/banner 
SYNC missed versions from official npm registry.

Banner

npm (scoped)

View on Storybook

Installation

Yarn

yarn add @leafygreen-ui/banner

NPM

npm install @leafygreen-ui/banner

Example

<Banner>This is the banner content</Banner>

Output HTML

<div role="alert" class="leafygreen-ui-zvv1x8">
  <svg
    width="16"
    height="16"
    role="img"
    viewBox="0 0 16 16"
    class="leafygreen-ui-1e46tsl"
  >
    <title>Edit Icon</title>
    <path
      d="M11.352 6.648l-2-2L11 3l2 2-1.648 1.648zM6 12l-3 1 1-3 4.648-4.648 2 2L6 12z"
      fill="currentColor"
      fill-rule="evenodd"
    />
  </svg>
  <span class="leafygreen-ui-1kr3ls8">This is the banner content.</span>
</div>

Properties

Prop Type Description Default
variant 'info', 'warning', 'danger', 'success' Sets the variant for the Banner 'info'
dismissible boolean Determines whether or not the Banner is dismissible false
onClose React.MouseEventHandler Callback fired when dismiss button is clicked () => {}
image React.ReactElement Illustration that will replace default Icon when the prop is supplied
... native div attributes Any other props will be spread on the root div element

Current Tags

  • 3.0.3                                ...           latest (5 days ago)

11 Versions

  • 3.0.3                                ...           5 days ago
  • 3.0.2                                ...           2 months ago
  • 3.0.1                                ...           3 months ago
  • 3.0.0                                ...           4 months ago
  • 2.0.4                                ...           5 months ago
  • 2.0.3                                ...           6 months ago
  • 2.0.2                                ...           7 months ago
  • 2.0.1                                ...           8 months ago
  • 2.0.0                                ...           8 months ago
  • 1.0.1                                ...           8 months ago
  • 1.0.0                                ...           8 months ago
Downloads
Today 0
This Week 0
This Month 11
Last Day 0
Last Week 10
Last Month 19
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |