-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add info banner to alert users of downtime (#421)
* feat: add info banner * test: set CI=false * chore: set max width * chore: remove banner-max-width Co-authored-by: Ian Chen <ian-@gmx.com>
- Loading branch information
1 parent
02e64a2
commit 2af8ddb
Showing
9 changed files
with
53 additions
and
9 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
21 changes: 21 additions & 0 deletions
21
frontend/src/components/common/info-banner/InfoBanner.module.scss
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,21 @@ | ||
@import 'styles/_variables'; | ||
@import 'styles/_mixins'; | ||
.container { | ||
background-color: $indigo-blue; | ||
height: auto; | ||
padding: 4px $site-padding; | ||
color: white; | ||
text-align: center; | ||
@include flex-horizontal; | ||
justify-content: center; | ||
|
||
.infoText { | ||
max-width: $header-max-width; | ||
font-size: 0.8rem; | ||
} | ||
|
||
@include mobile() { | ||
padding: 4px $mobile-site-padding; | ||
text-align: justify; | ||
} | ||
} |
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,18 @@ | ||
import React from 'react' | ||
|
||
import styles from './InfoBanner.module.scss' | ||
|
||
const InfoBanner = (props: any) => { | ||
const { children } = props | ||
if (!children) { | ||
return null | ||
} | ||
|
||
return ( | ||
<div className={styles.container}> | ||
<span className={styles.infoText}>{children}</span> | ||
</div> | ||
) | ||
} | ||
|
||
export default InfoBanner |
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 @@ | ||
export { default } from './InfoBanner' |
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
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