Skip to content

Alert 警告提示

基本用法

主要用于官网吊顶提示


云原生开源沙龙北京站开启报名,详情请点击了解。

<Alert
text={`云原生开源沙龙北京站开启报名,详情请<a style="color: inherit; display: inline" href="https://nacos.io/blog/nacos-gvr7dx_awbbpb_sozg59av10r22awa/?source=activity_activity-preview">点击</a>了解。`}
bgTheme="primary"
textTheme="secondary"
/>


云原生开源沙龙北京站开启报名,详情请点击了解。

<Alert
text={`云原生开源沙龙北京站开启报名,详情请<a style="color: inherit; display: inline" href="https://nacos.io/blog/nacos-gvr7dx_awbbpb_sozg59av10r22awa/?source=activity_activity-preview">点击</a>了解。`}
bgTheme="accent"
textTheme="base-100"
classes={{container:"h-[30px] border-2 border-primary", text:"font-bold",button:'mr-6'}}
/>

API

Alert

属性说明类型默认值
bgTheme背景颜色 使用 tailwind.config.mjs 中设置的 theme,例如 primary, gray, secondary… 等string”primary”
textTheme文字颜色 使用 tailwind.config.mjs 中设置的 theme,例如 primary, gray, secondary… 等string”secondary”
text标签名颜色 使用 tailwind.config.mjs 中设置的 theme,例如 primary, gray, secondary… 等string”gray”
classes作用于 Alert 的样式Alert.classes-

Alert.classes

属性说明类型默认值
container作用于卡片最外层包裹元素样式string”w-96”
title作用于卡片标题区域样式string""
body作用于卡片内容区域样式string""
actions作用于卡片底部操作组string""