@onsvisual/svelte-components 0.1.6 → 0.1.7

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.
@@ -2,6 +2,7 @@
2
2
  /** @typedef {typeof __propDef.events} OnsLogoEvents */
3
3
  /** @typedef {typeof __propDef.slots} OnsLogoSlots */
4
4
  export default class OnsLogo extends SvelteComponentTyped<{
5
+ theme?: any;
5
6
  width?: any;
6
7
  height?: any;
7
8
  compact?: boolean;
@@ -16,6 +17,7 @@ export type OnsLogoSlots = typeof __propDef.slots;
16
17
  import { SvelteComponentTyped } from "svelte";
17
18
  declare const __propDef: {
18
19
  props: {
20
+ theme?: any;
19
21
  width?: any;
20
22
  height?: any;
21
23
  compact?: boolean;
@@ -287,10 +287,10 @@
287
287
  <div class="ons-grid__col ons-col-auto">
288
288
  <a class="ons-header__org-logo-link" href="#0"
289
289
  ><div class="ons-header__org-logo ons-header__org-logo--large">
290
- <ONSLogo width="{197}" height="{19}" />
290
+ <ONSLogo theme="{theme}" width="{197}" height="{19}" />
291
291
  </div>
292
292
  <div class="ons-header__org-logo ons-header__org-logo--small">
293
- <ONSLogo width="{120}" height="{27}" compact />
293
+ <ONSLogo theme="{theme}" width="{120}" height="{27}" compact />
294
294
  </div></a
295
295
  >
296
296
  </div>
@@ -302,7 +302,7 @@
302
302
  <div class="header col-wrap">
303
303
  <div class="col col--lg-one-third col--md-one-third">
304
304
  <a href="{baseurl}/">
305
- <ONSLogo className="logo" height="{39}" compact />
305
+ <ONSLogo theme="{theme}" className="logo" height="{39}" compact />
306
306
  </a>
307
307
  </div>
308
308
  <div
@@ -1,15 +1,12 @@
1
1
  <script>
2
- import { getContext } from "svelte";
3
-
4
- const theme = getContext("theme");
5
-
6
- $: primary = theme === "dark" ? "white" : "#003c57";
7
- const secondary = "#a8bd3a";
8
-
9
2
  export let compact = false;
10
3
  export let className = "ons-svg-logo";
11
4
  export let width = null;
12
5
  export let height = null;
6
+ export let theme = null;
7
+
8
+ $: primary = theme === "dark" ? "white" : "#003c57";
9
+ const secondary = "#a8bd3a";
13
10
  </script>
14
11
 
15
12
  {#if !compact}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onsvisual/svelte-components",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "homepage": "https://onsvisual.github.io/svelte-components",