UNPKG

tharikida-ui

Version:

A modern, lightweight React UI component library with built-in theming, accessibility, and full TypeScript support. Create beautiful, responsive, and customizable web apps faster with ready-to-use components for any project.

71 lines (70 loc) 4.62 kB
import React from "react"; /** * `Alert` is a popup alert component with a customizable message, title, button text, theming, and custom styles. * * @param {object} props - The properties to customize the `Alert` component. * @param {string} [props.message] - The message to display in the alert popup. * @param {string} [props.title] - The title of the alert popup. * @param {string} [props.buttonText] - The text for the button that opens the alert. * @param {React.CSSProperties} [props.styles] - Custom styles for the alert popup content. * @param {string} [props.className] - Additional className for the alert container. * @param {number} [props.cornerRadius] - Border radius for the alert popup. Overrides theme.cornerRadius if provided. * @param {string} [props.primaryColor] - Primary color for the alert. Overrides theme.primaryColor if provided. * @param {string} [props.secondaryColor] - Secondary color for the alert. Overrides theme.secondaryColor if provided. * @param {string} [props.textColor] - Text color for the alert. Overrides theme.textColor if provided. * @param {string} [props.backgroundColor] - Background color for the alert. Overrides theme.backgroundColor if provided. * @param {number} [props.fontSize] - Font size for the alert. Overrides theme.fontSize if provided. * @param {string} [props.fontFamily] - Font family for the alert. Overrides theme.fontFamily if provided. * @param {number} [props.spacingfactor] - Spacing factor for the alert. Overrides theme.spacingfactor if provided. * @param {string} [props.borderColor] - Border color for the alert. Overrides theme.borderColor if provided. * @param {string} [props.shadowColor] - Shadow color for the alert. Overrides theme.shadowColor if provided. * @param {string} [props.borderWidth] - Border width for the alert. Overrides theme.borderWidth if provided. * @param {string} [props.borderStyle] - Border style for the alert. Overrides theme.borderStyle if provided. * @param {string} [props.fontWeight] - Font weight for the alert. Overrides theme.fontWeight if provided. * @param {string} [props.lineHeight] - Line height for the alert. Overrides theme.lineHeight if provided. * @param {string} [props.letterSpacing] - Letter spacing for the alert. Overrides theme.letterSpacing if provided. * @param {string} [props.transitionDuration] - Transition duration for the alert. Overrides theme.transitionDuration if provided. * @param {string} [props.padding] - Padding for the alert. Overrides theme.padding if provided. * @param {string} [props.margin] - Margin for the alert. Overrides theme.margin if provided. * @param {string} [props.shadowOffsetX] - Shadow offset X for the alert. Overrides theme.shadowOffsetX if provided. * @param {string} [props.shadowOffsetY] - Shadow offset Y for the alert. Overrides theme.shadowOffsetY if provided. * @param {string} [props.shadowBlur] - Shadow blur for the alert. Overrides theme.shadowBlur if provided. * @param {string} [props.shadowSpread] - Shadow spread for the alert. Overrides theme.shadowSpread if provided. * @param {boolean} [props.shadowInset] - Shadow inset for the alert. Overrides theme.shadowInset if provided. * @param {string} [props.hoverColor] - Hover color for the alert. Overrides theme.hoverColor if provided. * * @returns {JSX.Element} A styled popup alert component. */ export interface AlertProps { message?: string; title?: string; buttonText?: string; styles?: React.CSSProperties; className?: string; cornerRadius?: number; primaryColor?: string; secondaryColor?: string; textColor?: string; backgroundColor?: string; fontSize?: number; fontFamily?: string; spacingfactor?: number; borderColor?: string; shadowColor?: string; borderWidth?: string; borderStyle?: string; fontWeight?: string; lineHeight?: string; letterSpacing?: string; transitionDuration?: string; padding?: string; margin?: string; shadowOffsetX?: string; shadowOffsetY?: string; shadowBlur?: string; shadowSpread?: string; shadowInset?: boolean; hoverColor?: string; } declare const Alert: ({ message, title, buttonText, styles, className, cornerRadius, primaryColor, secondaryColor, textColor, backgroundColor, fontSize, fontFamily, spacingfactor, borderColor, shadowColor, borderWidth, borderStyle, fontWeight, lineHeight, letterSpacing, transitionDuration, padding, margin, shadowOffsetX, shadowOffsetY, shadowBlur, shadowSpread, shadowInset, hoverColor, }: AlertProps) => import("react/jsx-runtime").JSX.Element; export default Alert;