1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-04 00:18:01 +01:00
unleash.unleash/frontend/src/interfaces/banner.ts
Jaanus Sellin ec7bb2dae3
feat: add configurable event for banner goto action (#6603)
We added banner to get attention of customer, but we are not tracking
its usage.
Added a way to track the **goto action** button.
2024-03-19 12:09:09 +02:00

23 lines
522 B
TypeScript

import type { ReactNode } from 'react';
export type BannerVariant = 'info' | 'warning' | 'error' | 'success';
export interface IBanner {
message: string;
variant?: BannerVariant;
sticky?: boolean;
icon?: string;
link?: string;
linkClicked?: () => void;
linkText?: string;
plausibleEvent?: string;
dialogTitle?: string;
dialog?: ReactNode;
}
export interface IInternalBanner extends Omit<IBanner, 'plausibleEvent'> {
id: number;
enabled: boolean;
createdAt: string;
}