npm.io
10.2.6 • Published 1 month ago

@leafygreen-ui/banner

Licence
Apache-2.0
Version
10.2.6
Deps
7
Size
180 kB
Vulns
0
Weekly
0
Stars
274

Banner

npm (scoped)

View on MongoDB.design

Installation

PNPM
pnpm add @leafygreen-ui/banner
Yarn
yarn add @leafygreen-ui/banner
NPM
npm install @leafygreen-ui/banner

Example

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

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
baseFontSize 13, 16 Determines font-size for body copy in Callout component 13
darkMode boolean Determines if the component renders in dark theme false
... native div attributes Any other props will be spread on the root div element