refactor(alert): vertically center alert icon / endContent (#5512)

This commit is contained in:
WK 2025-07-29 00:51:23 +08:00 committed by GitHub
parent 67f8665ab5
commit a83e3fb5a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 3 deletions

View File

@ -0,0 +1,6 @@
---
"@heroui/alert": patch
"@heroui/theme": patch
---
vertically center alert icon / endContent (#2678)

View File

@ -40,7 +40,7 @@
"peerDependencies": {
"react": ">=18 || >=19.0.0-rc.0",
"react-dom": ">=18 || >=19.0.0-rc.0",
"@heroui/theme": ">=2.4.17",
"@heroui/theme": ">=2.4.19",
"@heroui/system": ">=2.4.18"
},
"dependencies": {

View File

@ -24,7 +24,7 @@ import {colorVariants} from "../utils";
*/
const alert = tv({
slots: {
base: "flex flex-grow flex-row w-full items-start py-3 px-4 gap-x-1",
base: "flex flex-grow flex-row w-full items-center py-3 px-4 gap-x-1",
mainWrapper:
"h-full flex-grow min-h-10 ms-2 flex flex-col box-border items-start text-inherit justify-center",
title: "text-small w-full font-medium block text-inherit leading-5",
@ -82,7 +82,7 @@ const alert = tv({
},
hasContent: {
false: {
base: "items-start",
base: "items-center",
mainWrapper: "justify-center items-center",
},
},