Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: making banner more composable (#6540)
- Loading branch information
Showing
5 changed files
with
36 additions
and
4 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
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
23 changes: 23 additions & 0 deletions
23
frontend/src/component/banners/OutdatedSdksBanner/OutdatedSdksBanner.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ConditionallyRender } from '../../common/ConditionallyRender/ConditionallyRender'; | ||
import { Banner } from '../Banner/Banner'; | ||
import { IBanner } from '../../../interfaces/banner'; | ||
|
||
export const OutdatedSdksBanner = () => { | ||
const displayOutdatedSdksBanner = false; | ||
const outdatedSdksBanner: IBanner = { | ||
message: `We noticed that you're using outdated SDKs. `, | ||
variant: 'warning', | ||
link: 'dialog', | ||
linkText: 'Please update those versions', | ||
dialogTitle: 'Outdated SDKs', | ||
dialog: <h1>Outdated SDKs</h1>, | ||
}; | ||
return ( | ||
<> | ||
<ConditionallyRender | ||
condition={displayOutdatedSdksBanner} | ||
show={<Banner banner={outdatedSdksBanner} />} | ||
/> | ||
</> | ||
); | ||
}; |
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