matrix-react-sdk
Version:
SDK for matrix.org using React
34 lines (33 loc) • 1.62 kB
TypeScript
import React from "react";
import { ButtonEvent } from "../../elements/AccessibleButton";
import { NotificationLevel } from "../../../../stores/notifications/NotificationLevel";
interface Props {
symbol: string | null;
count: number;
level: NotificationLevel;
knocked?: boolean;
/**
* If true, where we would normally show a badge, we instead show a dot. No numeric count will
* be displayed (but may affect whether the the dot is displayed). See class doc
* for the difference between the two.
*/
forceDot?: boolean;
}
interface ClickableProps extends Props {
/**
* If specified will return an AccessibleButton instead of a div.
*/
onClick(ev: ButtonEvent): void;
tabIndex?: number;
}
/**
* A notification indicator that conveys what activity / notifications the user has in whatever
* context it is being used.
*
* Can either be a 'badge': a small circle with a number in it (the 'count'), or a 'dot': a smaller, empty circle.
* The two can be used to convey the same meaning but in different contexts, for example: for unread
* notifications in the room list, it may have a green badge with the number of unread notifications,
* but somewhere else it may just have a green dot as a more compact representation of the same information.
*/
export declare const StatelessNotificationBadge: (props: ((import("matrix-js-sdk/src/matrix").Without<Props, ClickableProps> & ClickableProps) | (import("matrix-js-sdk/src/matrix").Without<ClickableProps, Props> & Props)) & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null;
export {};