communication-react-19
Version:
React library for building modern communication user experiences utilizing Azure Communication Services (React 19 compatible fork)
130 lines • 3.17 kB
TypeScript
/// <reference types="react" />
import { IIconProps, IStackStyles, IButtonStyles, IIconStyles } from '@fluentui/react';
/**
* Props for {@link Notification}.
*
* @public
*/
export interface NotificationProps {
/**
* Notification bar strings;
*/
notificationStrings?: NotificationStrings;
/**
* Notification bar icon;
*/
notificationIconProps?: IIconProps;
/**
* If set, notifications will automatically dismiss after 5 seconds
* @defaultValue false
*/
autoDismiss?: boolean;
/**
* If set, notifications will be shown in a stacked effect
* @defaultValue false
*/
showStackedEffect?: boolean;
/**
* Role html property for the notification bar.
* @defaultValue alert
*/
role?: 'alert' | 'status' | 'presentation' | 'none';
/**
* Aria-live property for the notification bar.
* @defaultValue assertive
*/
ariaLive?: 'assertive' | 'off' | 'polite';
/**
* Callback called when the primary button inside notification bar is clicked.
*/
onClickPrimaryButton?: () => void;
/**
* Callback called when the secondary button inside notification bar is clicked.
*/
onClickSecondaryButton?: () => void;
/**
* Callback called when the notification is dismissed.
*/
onDismiss?: () => void;
/**
* Optional callback to supply users with further troubleshooting steps or more information for the notification.
*/
onClickLink?: () => void;
/**
* Styles for the incoming call notifications.
*/
styles?: NotificationStyles;
}
/**
* All strings that may be shown on the UI in the {@link Notification}.
*
* @public
*/
export interface NotificationStrings {
/**
* Notification bar title.
*/
title: string;
/**
* Notification bar dismiss button aria label
*/
dismissButtonAriaLabel?: string;
/**
* Notification bar message.
*/
message?: string;
/**
* Notification bar primary button label
*/
primaryButtonLabel?: string;
/**
* Notification bar secondary button label
*/
secondaryButtonLabel?: string;
/**
* Notification bar link label
*/
linkLabel?: string;
}
/**
* Styles for the notification component.
*
* @public
*/
export interface NotificationStyles {
/**
* Styles for the primary button.
*/
primaryButton?: IButtonStyles;
/**
* Styles for the secondary button.
*/
secondaryButton?: IButtonStyles;
/**
* Styles for the root container.
*/
root?: IStackStyles;
/**
* Styles for the notification title.
*/
title?: IStackStyles;
/**
* Styles for the notification icon.
*/
icon?: IIconStyles;
/**
* Styles for the notification content.
*/
content?: IStackStyles;
/**
* Styles for the notification hyperlink.
*/
link?: IStackStyles;
}
/**
* A component to show notification messages on the UI.
*
* @public
*/
export declare const Notification: (props: NotificationProps) => JSX.Element;
//# sourceMappingURL=Notification.d.ts.map