/** * Copyright 2021, SumUp Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { type HTMLAttributes } from 'react'; import type { ClickEvent } from '../../types/events.js'; import { type BaseToastProps } from '../ToastContext/index.js'; import { type NotificationVariant } from '../Notification/constants.js'; export type NotificationToastProps = HTMLAttributes & BaseToastProps & { /** * The toast's variant. Default: `info`. */ variant?: NotificationVariant; /** * An optional headline for structured toast content. */ headline?: string; /** * The toast's body copy. */ body: string; /** * Whether the notification toast is visible. */ isVisible: boolean; /** * An optional callback that is called when the toast is dismissed, * manually or after a timeout. */ onClose?: (event: ClickEvent) => void; /** * A text replacement for the icon in the context of the toast, if its body * copy isn't self-explanatory. Defaults to an empty string. */ iconLabel?: string; }; export declare function NotificationToast({ variant, body, headline, onClose, iconLabel, isVisible, duration, // this is the auto-dismiss duration, not the animation duration. We shouldn't pass it to the wrapper along with ...props className, ...props }: NotificationToastProps): import("react/jsx-runtime").JSX.Element; export declare namespace NotificationToast { var TRANSITION_DURATION: number; } export declare const useNotificationToast: () => { setToast: (props: Omit) => void; };