/** * 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 MouseEvent, type KeyboardEvent, type HTMLAttributes } from 'react'; import { type ButtonProps } from '../Button/index.js'; import { type ImageProps } from '../Image/index.js'; type Action = Omit; type NotificationVariant = 'system' | 'promotional'; type CloseProps = { /** * Renders a close button in the top right corner and calls the provided * function when the button is clicked. */ onClose: (event: MouseEvent | KeyboardEvent) => void; /** * Text label for the close button for screen readers. * Important for accessibility. */ closeButtonLabel: string; } | { onClose?: never; closeButtonLabel?: never; }; interface NotificationImageProps extends ImageProps { /** * Align the image to one side of its container. Default: `center`. */ align?: 'top' | 'left' | 'bottom' | 'right' | 'center'; } interface BaseProps extends Omit, 'action'> { /** * Use the `system` variant for system notification use cases, otherwise, * use the `promotional` variant for promotional notification use cases. */ variant?: NotificationVariant; /** * Optional image to communicate message. The image container width is * adjustable. */ image?: NotificationImageProps; /** * Optional notification headline to communicate a message. */ headline?: string; /** * Optional notification body to communicate a message. */ body?: string; /** * A notification action to allow users to directly follow up on the * communicated content. It can be a `primary` or `tertiary` button. */ action: Action; /** * Whether the NotificationBanner is visible. */ isVisible?: boolean; } export type NotificationBannerProps = BaseProps & CloseProps; /** * The NotificationBanner displays a notification with text, a call-to-action, * and optionally an image. */ export declare const NotificationBanner: import("react").ForwardRefExoticComponent>; export {};