-
-
Notifications
You must be signed in to change notification settings - Fork 723
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move message banner interface to common file (#5076)
https://linear.app/unleash/issue/2-1527/set-up-message-banner-interfaces Tiny refactor to move the message banner interface to its own file, since it will be used in multiple places.
- Loading branch information
Showing
3 changed files
with
22 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 2 additions & 4 deletions
6
frontend/src/component/messageBanners/externalMessageBanners/ExternalMessageBanners.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
export type BannerVariant = 'warning' | 'info' | 'error' | 'success'; | ||
|
||
export interface IMessageBanner { | ||
message: string; | ||
variant?: BannerVariant; | ||
sticky?: boolean; | ||
icon?: string; | ||
link?: string; | ||
linkText?: string; | ||
plausibleEvent?: string; | ||
dialogTitle?: string; | ||
dialog?: string; | ||
} | ||
|
||
export interface IInternalMessageBanner extends IMessageBanner { | ||
id: number; | ||
enabled: boolean; | ||
createdAt: string; | ||
} |