@catho/react-floating-badge
Version:
Floating badge with actions for React
70 lines (69 loc) • 2.03 kB
TypeScript
/// <reference types="react" />
export declare enum BadgePosition {
BottomLeft = "bottom-left",
BottomRight = "bottom-right",
TopLeft = "top-left",
TopRight = "top-right"
}
export interface BalloonTheme {
readonly bgColor?: string;
readonly className?: string;
readonly fontColor?: string;
readonly fontSize?: string;
readonly margin?: number;
readonly width?: number;
}
export interface MenuTheme {
readonly descriptionBgColor?: string;
readonly descriptionFontColor?: string;
readonly descriptionFontSize?: number;
readonly descriptionMargin?: number;
readonly legendFontSize?: number;
readonly legendFontColor?: string;
readonly legendFontWeight?: string | number;
readonly legendSpacing?: number;
readonly itemFontSize?: number;
readonly itemVerticalMargin?: number;
readonly itemHorizontalMargin?: number;
readonly itemBgColor?: string;
readonly itemFontColor?: string;
readonly itemGlyphColor?: string;
readonly separatorColor?: string;
readonly width?: number;
readonly bottomBarColor?: string;
readonly className?: string;
}
export interface Link {
href: string;
alt?: string;
target?: string;
}
export interface MenuItem {
text: string;
link: Link;
}
export interface MenuProps {
description: string;
legend: string;
items: Array<MenuItem>;
}
export interface BadgeProps {
readonly bgColor: string;
readonly description: string;
readonly fontColor: string;
readonly height: number;
readonly margin: number;
readonly placeholder: string;
readonly position: BadgePosition;
readonly title: string;
className?: string;
loading: boolean | number;
showHint?: boolean;
hintContents?: string | JSX.Element;
hintTheme?: BalloonTheme;
menuTheme?: MenuTheme;
menuEnabled?: boolean;
showProgress?: boolean;
progress: number;
menu?: MenuProps;
}