-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
382a632
commit 0a8ab41
Showing
5 changed files
with
105 additions
and
40 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<script lang="ts"> | ||
import { page } from '$app/stores'; | ||
import { isReutersDev } from '$utils/env'; | ||
import { Block } from '@reuters-graphics/graphics-components'; | ||
/** | ||
* A message to display | ||
*/ | ||
export let message: string; | ||
/** | ||
* The level of the message, either `warn` or `info` | ||
*/ | ||
export let level: 'warn' | 'info' = 'warn'; | ||
</script> | ||
|
||
{#if isReutersDev($page.url)} | ||
<!-- This log will only appear in development. --> | ||
<Block> | ||
<div class="{level}"> | ||
<span>{level.toUpperCase()}</span> | ||
{message} | ||
</div> | ||
</Block> | ||
{/if} | ||
|
||
<style lang="scss"> | ||
div { | ||
margin: 15px 0; | ||
padding: 0.75rem; | ||
font-family: monospace; | ||
font-size: 0.85rem; | ||
border-radius: 4px; | ||
span { | ||
display: inline-block; | ||
padding: 2px 5px; | ||
border-radius: 2px; | ||
} | ||
&.warn { | ||
color: #000; | ||
background-color: #ffe0e0; | ||
border: 1px solid #ffbebe; | ||
span { | ||
background-color: #dc3545; | ||
color: white; | ||
} | ||
} | ||
&.info { | ||
color: #000; | ||
background-color: #e0f7ff; | ||
border: 1px solid #d2dcff; | ||
span { | ||
background-color: #007bff; | ||
color: white; | ||
} | ||
} | ||
} | ||
</style> |
This file was deleted.
Oops, something went wrong.
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