No Preview

Sorry, but you either have no stories or none are selected somehow.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

The component failed to render properly, likely due to a configuration issue in Storybook. Here are some common causes and how you can address them:

  1. Missing Context/Providers: You can use decorators to supply specific contexts or providers, which are sometimes necessary for components to render correctly. For detailed instructions on using decorators, please visit the Decorators documentation.
  2. Misconfigured Webpack or Vite: Verify that Storybook picks up all necessary settings for loaders, plugins, and other relevant parameters. You can find step-by-step guides for configuring Webpack or Vite with Storybook.
  3. Missing Environment Variables: Your Storybook may require specific environment variables to function as intended. You can set up custom environment variables as outlined in the Environment Variables documentation.

Alert

The Alert component displays a short, important message in a way that attracts the user's attention without interrupting the user's task.

import { Alert } from 'jimu-ui'
NameDescriptionDefaultControl
banner
Whether to show as banner.
boolean
false
shape
The rounded corners of components
"none""shape1""shape2"
"none"
fullWidth
If true, the component will take up the full width of its container.
boolean
false
type
The type of AlertButton, which will represent different meanings, such as 'warning' and 'error'.
"error""success""info""warning"
"warning"
text
Text content to display.
string
-
closable
Can the panel be closed.
boolean
false
withIcon
Whether to display the icon for the type.
boolean
false
open
Whether the panel is visible.
boolean
true
title
Defines the title added to the element.
string
-
className
Defines the class names added to the component.
string
-
style
Defines the styles added to the element.
CSSProperties
-
action
The action to display. It renders after the message, at the end of the alert.
ReactNode
-
onClose
If closable is true, this event will be triggered when the close button is clicked.
() => void
--

Stories

Basic

With Title

Closable

Action

Fade Transition

A 11 Y Message

Tooltip

Custom Tooltip