Banner
关于某种状态的常驻提示:底色、图标、文字和操作;错误使用提示消息。
<div className="flex w-560 max-w-full flex-col gap-12">
<Banner tone="info" title="New models are available" actions={<Button size="sm">Review</Button>} onDismiss={() => undefined}>
models.dev added 4 models since the last sync.
</Banner>
<Banner tone="warning">This key expires in 5 days.</Banner>
<Banner tone="danger" title="This organization is scheduled for deletion" actions={<Button size="sm">Restore organization</Button>}>
Its keys stopped working; on 20 Oct 2026 it is deleted for good.
</Banner>
<Banner tone="success">Single sign-on is on for northwind.example.</Banner>
<Banner>Content logging is off for this project.</Banner>
</div>import { Banner } from "@logicplanes/kaeso-ui";属性
actionsReactNode小号胶囊按钮:位于右侧,与标题和文字居中对齐;横幅较窄时位于文字下方。
childrenReactNode消息内容,需要时附带操作。
iconIconSvgElement替换色调自带图标的图标。
layout"inline" | "full" = inline位于内容中(
inline)或横贯面板全宽(full)。onDismiss(() => void)只有信息类横幅可以关闭。
titleReactNode横幅的标题。
tone"neutral" | "success" | "warning" | "danger" | "info" = neutral消息类型,从中性信息到危险警告。