Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/neat-badgers-beam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/alert": patch
---

mark description prop as optional (#4445)
5 changes: 5 additions & 0 deletions .changeset/new-cups-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/theme": patch
---

fix the alignment when only alert children is provided
4 changes: 2 additions & 2 deletions packages/components/alert/src/use-alert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ interface Props extends HTMLNextUIProps<"div"> {
*/
title?: string;
/**
* Main body of the alert message
* description of the alert message
*/
description: ReactNode;
description?: ReactNode;
/**
* Icon to be displayed in the alert - overrides the default icon
*/
Expand Down
3 changes: 2 additions & 1 deletion packages/core/theme/src/components/alert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ 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",
mainWrapper: "h-full flex-grow min-h-10 ms-2 flex flex-col box-border items-start text-inherit",
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",
description: "pl-[1px] text-small font-normal text-inherit",
closeButton: "relative text-inherit translate-x-1 -translate-y-1",
Expand Down