@onsvisual/svelte-components 0.1.46 → 0.1.47

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.
@@ -3,6 +3,7 @@
3
3
  /** @typedef {typeof __propDef.slots} NavSectionSlots */
4
4
  export default class NavSection extends SvelteComponentTyped<{
5
5
  id?: string;
6
+ cls?: string;
6
7
  title?: string;
7
8
  hideTitle?: boolean;
8
9
  subsection?: boolean;
@@ -19,6 +20,7 @@ import { SvelteComponentTyped } from "svelte";
19
20
  declare const __propDef: {
20
21
  props: {
21
22
  id?: string;
23
+ cls?: string;
22
24
  title?: string;
23
25
  hideTitle?: boolean;
24
26
  subsection?: boolean;
@@ -13,6 +13,11 @@
13
13
  * @type {string}
14
14
  */
15
15
  export let id = slugify(title);
16
+ /**
17
+ * (Optional) Sets a css class for the section
18
+ * @type {string}
19
+ */
20
+ export let cls = null;
16
21
  /**
17
22
  * Allows the h2 title tag for the section to be visually hidden
18
23
  * @type {boolean}
@@ -45,7 +50,7 @@
45
50
  });
46
51
  </script>
47
52
 
48
- <section id="{id}" aria-label="{title}" bind:this="{section}">
53
+ <section id="{id}" class="{cls}" aria-label="{title}" bind:this="{section}">
49
54
  {#if title}
50
55
  {#if subsection}
51
56
  <h3 class="subsection-title ons-u-fs-m" class:ons-u-vh="{hideTitle}">{title}</h3>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onsvisual/svelte-components",
3
- "version": "0.1.46",
3
+ "version": "0.1.47",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "homepage": "https://onsvisual.github.io/svelte-components",