@postenbring/hedwig-react
Version:
React components for [Hedwig Design System](https://github.com/bring/hedwig-design-system).
50 lines • 1.71 kB
TypeScript
import React, { forwardRef, type HTMLAttributes } from "react";
import { type BoxProps } from "../box/box";
export interface AlertTitleProps extends HTMLAttributes<HTMLParagraphElement> {
/**
* Change the default rendered element for the one passed as a child, merging their props and behavior.
*
* @default false
*/
asChild?: boolean;
}
export declare const AlertTitle: React.ForwardRefExoticComponent<AlertTitleProps & React.RefAttributes<HTMLParagraphElement>>;
export interface AlertDescriptionProps extends HTMLAttributes<HTMLParagraphElement> {
/**
* Change the default rendered element for the one passed as a child, merging their props and behavior.
*
* @default false
*/
asChild?: boolean;
}
export declare const AlertDescription: React.ForwardRefExoticComponent<AlertDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
export type AlertProps = ({
/**
* @deprecated use data-color instead
*/
variant?: "info" | "success" | "warning" | "error";
icon?: never;
iconClassName?: never;
} | {
/**
* @deprecated use data-color instead
*/
variant: "neutral";
icon?: React.ReactNode;
iconClassName?: string;
} | {
"data-color"?: "info" | "success" | "warning" | "error";
icon?: never;
iconClassName?: never;
} | {
"data-color": "neutral";
icon?: React.ReactNode;
iconClassName?: string;
}) & Omit<BoxProps, "variant" | "asChild">;
export declare const Alert: AlertType;
type AlertType = ReturnType<typeof forwardRef<HTMLDivElement, AlertProps>> & {
Title: typeof AlertTitle;
Description: typeof AlertDescription;
};
export {};
//# sourceMappingURL=alert.d.ts.map