@payfit/unity-components
Version:
46 lines (45 loc) • 1.32 kB
TypeScript
import { VariantProps } from '@payfit/unity-themes';
import { PropsWithChildren } from 'react';
declare const unityToast: import('tailwind-variants').TVReturnType<{
variant: {
success: string;
error: string;
};
}, {
base: string;
contentWrapper: string;
divider: string;
}, undefined, {
variant: {
success: string;
error: string;
};
}, {
base: string;
contentWrapper: string;
divider: string;
}, import('tailwind-variants').TVReturnType<{
variant: {
success: string;
error: 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;
}
/**
* 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, ...rest }: PropsWithChildren<UnityToastProps>): import("react/jsx-runtime").JSX.Element;
displayName: string;
};
export { UnityToast };