import React from "react"; import classNames from "classnames"; import { Icon } from "../icon"; import { StyledProps } from "../_type"; import { useConfig } from "../_util/config-context"; /** * 对话框内容展示 */ export interface ModalMessageProps extends StyledProps { /** * 要提示的消息 */ message?: React.ReactNode; /** * 可选的详细解释 */ description?: React.ReactNode; /** * 提示图标 */ icon?: "error" | "warning" | "pending" | "infoblue" | "success"; } export const ModalMessage = React.forwardRef(function ModalMessage( { icon, message, description, className, ...props }: ModalMessageProps, ref: React.Ref ) { const { classPrefix } = useConfig(); return (
{icon && (
)}
{message && (

{message}

)} {description && (
{description}
)}
); }); ModalMessage.displayName = "ModalMessage";