mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
fix(avatar): title type in Avatar (#4529)
* fix(avatar): title type in Avatar * fix(alert): apply isEmpty check on title * fix(alert): alert interface props type
This commit is contained in:
parent
cfff127464
commit
fcdf24a019
5
.changeset/quick-peas-care.md
Normal file
5
.changeset/quick-peas-care.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"@nextui-org/alert": patch
|
||||
---
|
||||
|
||||
fix title type in Avatar (#4525)
|
||||
@ -138,7 +138,7 @@ Alert has the following slots:
|
||||
data={[
|
||||
{
|
||||
attribute: "title",
|
||||
type: "string",
|
||||
type: "ReactNode",
|
||||
description: "The alert title",
|
||||
default: "-"
|
||||
},
|
||||
|
||||
@ -62,7 +62,7 @@ const Alert = forwardRef<"div", AlertProps>((props, ref) => {
|
||||
{customIcon || <IconComponent {...getAlertIconProps()} />}
|
||||
</div>
|
||||
<div {...getMainWrapperProps()}>
|
||||
{title && <div {...getTitleProps()}>{title}</div>}
|
||||
{!isEmpty(title) && <div {...getTitleProps()}>{title}</div>}
|
||||
{!isEmpty(description) && <div {...getDescriptionProps()}>{description}</div>}
|
||||
{children}
|
||||
</div>
|
||||
|
||||
@ -9,7 +9,7 @@ import {alert} from "@nextui-org/theme";
|
||||
import {useControlledState} from "@react-stately/utils";
|
||||
import {clsx, dataAttr, isEmpty, objectToDeps} from "@nextui-org/shared-utils";
|
||||
|
||||
interface Props extends HTMLNextUIProps<"div"> {
|
||||
interface Props extends Omit<HTMLNextUIProps<"div">, "title"> {
|
||||
/**
|
||||
* Ref to the DOM node.
|
||||
*/
|
||||
@ -17,7 +17,7 @@ interface Props extends HTMLNextUIProps<"div"> {
|
||||
/**
|
||||
* title of the alert message
|
||||
*/
|
||||
title?: string;
|
||||
title?: ReactNode;
|
||||
/**
|
||||
* description of the alert message
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user