/** * 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 ForwardRefExoticComponent, type HTMLAttributes, type RefAttributes } from 'react'; import { type AnchorProps } from '../Anchor/index.js'; import type { ClickEvent } from '../../types/events.js'; import { type NotificationVariant } from '../Notification/constants.js'; type Action = AnchorProps; type CloseProps = { /** * Renders a close button in the top right corner and calls the provided function * when the button is clicked. */ onClose: (event: ClickEvent) => void; /** * Text label for the close button for screen readers. * Important for accessibility. */ closeButtonLabel: string; } | { onClose?: never; closeButtonLabel?: never; }; type BaseProps = HTMLAttributes & { /** * The notification's variant. Defaults to `info`. */ variant?: NotificationVariant; /** * An optional headline for structured content. Can be a string (an `h3` * heading label) or object containing a label and heading level. */ headline?: string | { as: 'h2' | 'h3' | 'h4' | 'h5' | 'h6'; label: string; }; /** * The notification's body copy. */ body: string; /** * An optional call-to-action button. */ action?: Action; /** * Whether the notification is visible. */ isVisible?: boolean; /** * A text replacement for the icon in the context of the notification, if its * body copy isn't self-explanatory. Defaults to an empty string. */ iconLabel?: string; }; export type NotificationInlineProps = BaseProps & CloseProps; type NotificationInlineComponent = ForwardRefExoticComponent> & { TIMEOUT: number; }; export declare const NotificationInline: NotificationInlineComponent; export {};