infinity-ui-elements
Version:
A React TypeScript component library with Tailwind CSS design system
60 lines • 1.91 kB
TypeScript
import * as React from "react";
declare const alertVariants: (props?: ({
emphasis?: "subtle" | "intense" | null | undefined;
intent?: "info" | "positive" | "negative" | "notice" | "neutral" | null | undefined;
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
export interface AlertProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
/**
* The visual emphasis level of the alert
*/
emphasis?: "subtle" | "intense";
/**
* The intent/type of the alert
*/
intent?: "positive" | "negative" | "notice" | "info" | "neutral";
/**
* The title of the alert
*/
title?: string;
/**
* The body content of the alert
*/
children: React.ReactNode;
/**
* Whether the alert should take full width
* When true, actions are placed to the right of the content
* When false, actions are placed below the content
*/
isFullWidth?: boolean;
/**
* Callback fired when the close button is clicked
*/
onClose?: () => void;
/**
* Custom icon to display. If not provided, an icon will be automatically selected based on intent
*/
icon?: React.ReactNode;
/**
* Action button text. If provided, a button will be automatically created based on the variant
*/
actionButtonText?: string;
/**
* Callback fired when the action button is clicked
*/
onActionButtonClick?: () => void;
/**
* Action link to display
*/
actionLinkText?: string;
/**
* Callback fired when the action link is clicked
*/
onActionLinkClick?: () => void;
/**
* Custom class name for the alert
*/
className?: string;
}
declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
export { Alert, alertVariants };
//# sourceMappingURL=Alert.d.ts.map