UNPKG

@mijn-ui/react-alert

Version:

A component for displaying critical information or notifications.

91 lines (87 loc) 3.79 kB
import * as react_jsx_runtime from 'react/jsx-runtime'; import * as tailwind_merge from 'tailwind-merge'; import * as _mijn_ui_react_core from '@mijn-ui/react-core'; import { UnstyledComponentWithSlots } from '@mijn-ui/react-core'; import * as tailwind_variants from 'tailwind-variants'; import { VariantProps } from 'tailwind-variants'; import * as React from 'react'; declare const alertStyles: tailwind_variants.TVReturnType<{ variant: { default: string; brand: string; secondary: string; success: string; warning: string; danger: string; inverse: string; }; }, { base: string; iconWrapper: string; title: string; description: string; }, undefined, { variant: { default: string; brand: string; secondary: string; success: string; warning: string; danger: string; inverse: string; }; }, { base: string; iconWrapper: string; title: string; description: string; }, tailwind_variants.TVReturnType<{ variant: { default: string; brand: string; secondary: string; success: string; warning: string; danger: string; inverse: string; }; }, { base: string; iconWrapper: string; title: string; description: string; }, undefined, unknown, unknown, undefined>>; type AlertVariantProps = VariantProps<typeof alertStyles>; type AlertSlots = keyof ReturnType<typeof alertStyles>; type AlertBaseProps = UnstyledComponentWithSlots<AlertSlots>; declare const useAlertStyles: (unstyledOverride?: boolean) => { classNames: _mijn_ui_react_core.SlotsToClasses<"base" | "iconWrapper" | "title" | "description"> | undefined; isUnstyled: boolean | undefined; base: (slotProps?: ({ variant?: "default" | "brand" | "secondary" | "success" | "warning" | "danger" | "inverse" | undefined; } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined; iconWrapper: (slotProps?: ({ variant?: "default" | "brand" | "secondary" | "success" | "warning" | "danger" | "inverse" | undefined; } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined; title: (slotProps?: ({ variant?: "default" | "brand" | "secondary" | "success" | "warning" | "danger" | "inverse" | undefined; } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined; description: (slotProps?: ({ variant?: "default" | "brand" | "secondary" | "success" | "warning" | "danger" | "inverse" | undefined; } & tailwind_variants.ClassProp<tailwind_merge.ClassNameValue>) | undefined) => string | undefined; }; type AlertProps = React.ComponentProps<"div"> & AlertVariantProps & AlertBaseProps; declare const Alert: ({ variant, unstyled, className, classNames, ...props }: AlertProps) => react_jsx_runtime.JSX.Element; type AlertIconProps = React.ComponentProps<"span"> & { unstyled?: boolean; }; declare const AlertIcon: ({ unstyled, className, ...props }: AlertIconProps) => react_jsx_runtime.JSX.Element; type AlertTitleProps = React.ComponentProps<"h5"> & { unstyled?: boolean; }; declare const AlertTitle: ({ unstyled, className, ...props }: AlertTitleProps) => react_jsx_runtime.JSX.Element; type AlertDescriptionProps = React.ComponentProps<"p"> & { unstyled?: boolean; }; declare const AlertDescription: ({ unstyled, className, ...props }: AlertDescriptionProps) => react_jsx_runtime.JSX.Element; export { Alert, AlertDescription, type AlertDescriptionProps, AlertIcon, type AlertIconProps, type AlertProps, type AlertSlots, AlertTitle, type AlertTitleProps, type AlertVariantProps, alertStyles, useAlertStyles };