-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tom/site information component (#1552)
* refactor: remove legacy testnet banner component * feature: add site information component * fix: whitespace * chore: update default env variable * refactor: extend main container * refactor: add information component to main container * rename const * refactor: update alert styling * fix: bold link styling
- Loading branch information
Showing
9 changed files
with
41 additions
and
24 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
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 |
---|---|---|
@@ -1,11 +1,19 @@ | ||
import { FlexProps } from '@/component-library'; | ||
import { SiteInformation } from '@/components'; | ||
|
||
import { StyledContainer } from './MainContainer.styles'; | ||
|
||
type MainContainerProps = FlexProps; | ||
|
||
const MainContainer = ({ direction = 'column', gap = 'spacing8', ...props }: MainContainerProps): JSX.Element => ( | ||
<StyledContainer direction={direction} gap={gap} {...props} /> | ||
); | ||
const MainContainer = ({ direction = 'column', gap = 'spacing8', ...props }: MainContainerProps): JSX.Element => { | ||
const showSiteInformationMessage = !!process.env.REACT_APP_SITE_INFORMATION_MESSAGE; | ||
|
||
return ( | ||
<StyledContainer direction={direction} gap={gap} {...props}> | ||
{showSiteInformationMessage && <SiteInformation />} | ||
{props.children} | ||
</StyledContainer> | ||
); | ||
}; | ||
|
||
export { MainContainer }; |
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 { Alert, TextLink } from '@/component-library'; | ||
|
||
const SiteInformation = (): JSX.Element => { | ||
const hasLink = !!process.env.REACT_APP_SITE_INFORMATION_LINK; | ||
|
||
return ( | ||
<Alert status='warning'> | ||
{process.env.REACT_APP_SITE_INFORMATION_MESSAGE} | ||
{hasLink && ( | ||
<> | ||
{' '} | ||
<TextLink weight='bold' external icon to={process.env.REACT_APP_SITE_INFORMATION_LINK || ''}> | ||
More information | ||
</TextLink> | ||
</> | ||
)} | ||
</Alert> | ||
); | ||
}; | ||
|
||
export { SiteInformation }; |
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 { SiteInformation } from './SiteInformation'; |
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 was deleted.
Oops, something went wrong.
1f80570
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
interbtc-ui-kintsugi-testnet – ./
interbtc-ui-kintsugi-testnet-git-master-interlay.vercel.app
interbtc-ui.vercel.app
interbtc-ui-kintsugi-testnet-interlay.vercel.app
kintnet.interlay.io
1f80570
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
interbtc-ui-interlay-testnet – ./
interbtc-ui-interlay-testnet.vercel.app
interbtc-ui-interlay-testnet-git-master-interlay.vercel.app
interbtc-ui-interlay-testnet-interlay.vercel.app
testnet.interlay.io