UNPKG

@payfit/unity-components

Version:

72 lines (71 loc) 1.87 kB
import { VariantProps } from '@payfit/unity-themes'; import { PropsWithChildren } from 'react'; declare const unityToast: import('tailwind-variants').TVReturnType<{ variant: { success: string; error: string; }; isInline: { true: { contentWrapper: string; }; false: { contentWrapper: string; }; }; }, { base: string; contentWrapper: string; divider: string; }, undefined, { variant: { success: string; error: string; }; isInline: { true: { contentWrapper: string; }; false: { contentWrapper: string; }; }; }, { base: string; contentWrapper: string; divider: string; }, import('tailwind-variants').TVReturnType<{ variant: { success: string; error: string; }; isInline: { true: { contentWrapper: string; }; false: { contentWrapper: string; }; }; }, { base: string; contentWrapper: string; divider: string; }, undefined, unknown, unknown, undefined>>; export interface UnityToastProps extends Required<Pick<VariantProps<typeof unityToast>, 'variant'>> { /** callback to call to close the toast*/ onClose: () => void; /** render the toast in inline mode or not (by default true) */ inline?: boolean; } /** * The `UnityToast` is the component which will contain a title, a content, and action * - `ToastTitle`: The title of the toast * - `ToastContent`(optional): The content of the toast * - `ToastAction`(optional): The action on the toast */ declare const UnityToast: { ({ children, onClose, variant, inline, ...rest }: PropsWithChildren<UnityToastProps>): import("react/jsx-runtime").JSX.Element; displayName: string; }; export { UnityToast };