@reuters-graphics/graphics-components 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,6 +23,9 @@ declare const __propDef: {
23
23
  * Add an id to the block tag to target it with custom CSS.
24
24
  * @type {string}
25
25
  */ id?: string;
26
+ /**
27
+ * Page theme
28
+ */ theme?: "light" | "dark";
26
29
  };
27
30
  events: {
28
31
  [evt: string]: CustomEvent<any>;
@@ -26,11 +26,15 @@ export { cls as class };
26
26
  * @type {string}
27
27
  */
28
28
  export let id = '';
29
+ /**
30
+ * Page theme
31
+ */
32
+ export let theme = 'light';
29
33
  import Block from '../Block/Block.svelte';
30
34
  import { marked } from 'marked';
31
35
  </script>
32
36
 
33
- <aside class="infobox">
37
+ <aside class="infobox {theme}">
34
38
  <Block
35
39
  width="{width}"
36
40
  id="{id}"
@@ -74,7 +78,12 @@ https://utopia.fyi/space/calculator/?c=320,18,1.125,1280,21,1.25,7,3,&s=0.75|0.5
74
78
  /* Scales by 1.125 */
75
79
  .infobox :global(.article-block) {
76
80
  border-color: var(--theme-colour-brand-rules);
77
- background-color: #fafafa;
81
+ }
82
+ .infobox.light :global(.article-block) {
83
+ background-color: rgb(250, 250, 250);
84
+ }
85
+ .infobox.dark :global(.article-block) {
86
+ background-color: rgba(250, 250, 250, 0.1);
78
87
  }
79
88
  .infobox :global(.header p) {
80
89
  font-family: var(--theme-font-family-subhed);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reuters-graphics/graphics-components",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "homepage": "https://reuters-graphics.github.io/graphics-components",