@mijn-ui/react-alert
Version:
A component for displaying critical information or notifications.
39 lines (36 loc) • 2.71 kB
TypeScript
import * as react_jsx_runtime from 'react/jsx-runtime';
import * as tailwind_variants from 'tailwind-variants';
import * as tailwind_merge from 'tailwind-merge';
import * as _mijn_ui_react_theme from '@mijn-ui/react-theme';
import { AlertVariantProps, UnstyledProps, UnstyledComponentWithSlots, AlertSlots } from '@mijn-ui/react-theme';
import * as React from 'react';
type AlertBaseProps = UnstyledComponentWithSlots<AlertSlots>;
declare const useAlertStyles: (unstyledOverride?: boolean) => {
classNames: _mijn_ui_react_theme.SlotsToClasses<"base" | "iconWrapper" | "title" | "description"> | undefined;
isUnstyled: boolean | undefined;
base: (slotProps?: ({
variant?: "filled" | "outlined" | "subtle" | undefined;
color?: "default" | "success" | "info" | "warning" | "danger" | undefined;
} & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
iconWrapper: (slotProps?: ({
variant?: "filled" | "outlined" | "subtle" | undefined;
color?: "default" | "success" | "info" | "warning" | "danger" | undefined;
} & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
title: (slotProps?: ({
variant?: "filled" | "outlined" | "subtle" | undefined;
color?: "default" | "success" | "info" | "warning" | "danger" | undefined;
} & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
description: (slotProps?: ({
variant?: "filled" | "outlined" | "subtle" | undefined;
color?: "default" | "success" | "info" | "warning" | "danger" | undefined;
} & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined;
};
type AlertProps = React.ComponentProps<"div"> & AlertVariantProps & AlertBaseProps;
declare const Alert: ({ variant, color, unstyled, className, classNames, ...props }: AlertProps) => react_jsx_runtime.JSX.Element;
type AlertIconProps = React.ComponentProps<"span"> & UnstyledProps;
declare const AlertIcon: ({ unstyled, className, ...props }: AlertIconProps) => react_jsx_runtime.JSX.Element;
type AlertTitleProps = React.ComponentProps<"h5"> & UnstyledProps;
declare const AlertTitle: ({ unstyled, className, ...props }: AlertTitleProps) => react_jsx_runtime.JSX.Element;
type AlertDescriptionProps = React.ComponentProps<"p"> & UnstyledProps;
declare const AlertDescription: ({ unstyled, className, ...props }: AlertDescriptionProps) => react_jsx_runtime.JSX.Element;
export { Alert, AlertDescription, type AlertDescriptionProps, AlertIcon, type AlertIconProps, type AlertProps, AlertTitle, type AlertTitleProps, useAlertStyles };