1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-11-01 19:07:38 +01:00
unleash.unleash/frontend/src/interfaces/banner.ts
Nuno Góis 3ca22c7c5c
feat: banner modal (#5132)
https://linear.app/unleash/issue/2-1548/ui-create-banner-newedit-modal

Adds a new banner modal (and form) that allows admins to create and edit
banners.
Also adds a new `FormSwitch` common component that may be helpful in
different situations where we need a switch on a form.

<img width="1263" alt="image"
src="https://github.com/Unleash/unleash/assets/14320932/1b89db9b-9003-413c-8829-c37d245e2487">
2023-10-24 16:26:44 +01:00

20 lines
448 B
TypeScript

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