@onsvisual/svelte-components 1.1.12 → 1.1.13

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.
@@ -1,4 +1,6 @@
1
1
  <script>
2
+ import Container from "../Container/Container.svelte";
3
+
2
4
  /**
3
5
  * Phase of project (alpha, beta, prototype etc.)
4
6
  * @type {string}
@@ -15,6 +17,11 @@
15
17
  * @type {string}
16
18
  */
17
19
  export let href = "https://www.ons.gov.uk/feedback";
20
+ /**
21
+ * Sets the width of the banner
22
+ * @type {"narrow"|"medium"|"wide"|"wider"|"full"}
23
+ */
24
+ export let width = "wide";
18
25
  /**
19
26
  * Optional: Set an additional CSS class for the component
20
27
  * @type {string|null}
@@ -22,8 +29,8 @@
22
29
  export let cls = null;
23
30
  </script>
24
31
 
25
- <div class="ons-phase-banner {cls}">
26
- <div class="ons-container">
32
+ <div class="ons-phase-banner {cls}" class:ons-phase-banner__full={width === "full"}>
33
+ <Container {width}>
27
34
  <div
28
35
  class="ons-grid ons-grid-flex ons-grid--gutterless ons-grid-flex--vertical-center ons-grid-flex--no-wrap"
29
36
  >
@@ -68,5 +75,11 @@
68
75
  </p>
69
76
  </div>
70
77
  </div>
71
- </div>
78
+ </Container>
72
79
  </div>
80
+
81
+ <style>
82
+ .ons-phase-banner__full :global(.ons-page__container) {
83
+ padding: 0 12px;
84
+ }
85
+ </style>
@@ -3,6 +3,7 @@
3
3
  /** @typedef {typeof __propDef.slots} PhaseBannerSlots */
4
4
  export default class PhaseBanner extends SvelteComponentTyped<{
5
5
  cls?: string | null | undefined;
6
+ width?: "narrow" | "medium" | "wide" | "wider" | "full" | undefined;
6
7
  href?: string | undefined;
7
8
  description?: string | undefined;
8
9
  phase?: string | undefined;
@@ -17,6 +18,7 @@ import { SvelteComponentTyped } from "svelte";
17
18
  declare const __propDef: {
18
19
  props: {
19
20
  cls?: string | null | undefined;
21
+ width?: "narrow" | "medium" | "wide" | "wider" | "full" | undefined;
20
22
  href?: string | undefined;
21
23
  description?: string | undefined;
22
24
  phase?: string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onsvisual/svelte-components",
3
- "version": "1.1.12",
3
+ "version": "1.1.13",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "npm run build:package && npm run build:docs",