@bonniernews/dn-design-system-web 9.1.2 → 9.1.3
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.
- package/CHANGELOG.md +7 -0
- package/components/modal/README.md +4 -8
- package/components/modal/modal.njk +6 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@ All changes to @bonniernews/dn-design-system-web will be documented in this file
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
## [9.1.3](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@9.1.2...@bonniernews/dn-design-system-web@9.1.3) (2024-01-12)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Maintenance
|
|
11
|
+
|
|
12
|
+
* **web:** change bodyText to bodyHtml in modal ([#1163](https://github.com/BonnierNews/dn-design-system/issues/1163)) ([e5b55e3](https://github.com/BonnierNews/dn-design-system/commit/e5b55e3366de257231974c4732e8a80cd025098e))
|
|
13
|
+
|
|
7
14
|
## [9.1.2](https://github.com/BonnierNews/dn-design-system/compare/@bonniernews/dn-design-system-web@9.1.1...@bonniernews/dn-design-system-web@9.1.2) (2024-01-12)
|
|
8
15
|
|
|
9
16
|
|
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
|parameter | type | required | options | default | description |
|
|
13
13
|
|:--- | :--- | :--- | :--- | :--- | :--- |
|
|
14
|
-
| title | String |
|
|
15
|
-
| bodyText | String | yes | text | | Text in modal |
|
|
14
|
+
| title | String | no | | | Title in modal |
|
|
16
15
|
| primaryButton | Object | no | text | | Object with text, href (optional), classNames (optional) and attributes (optional) |
|
|
17
16
|
| secondaryButton | Object | no | text | | Object with text, href (optional), classNames (optional) and attributes (optional). Set isCloseButton to true if you wanna close modal with this button |
|
|
18
17
|
| classNames | String | no | | | Ex. "my-special-class" |
|
|
@@ -28,12 +27,9 @@ These are copy paste friendly examples to quickliy get started using a component
|
|
|
28
27
|
```javascript
|
|
29
28
|
{% from '@bonniernews/dn-design-system-web/components/modal/modal.njk' import Modal %}
|
|
30
29
|
|
|
31
|
-
{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
primaryButton: "Text i knapp",
|
|
35
|
-
secondaryButton: "Text i knapp",
|
|
36
|
-
})}}
|
|
30
|
+
{% call Modal({title: "Rubrik", primaryButton: { text: "Text i knapp", href: "ww.url.se" }, secondaryButton: { text: "Text i knapp", isCloseButton: true } }) %}
|
|
31
|
+
<p>Text i modalen</p>
|
|
32
|
+
{% endcall %}
|
|
37
33
|
```
|
|
38
34
|
|
|
39
35
|
### Scss
|
|
@@ -22,8 +22,12 @@
|
|
|
22
22
|
iconName: "close",
|
|
23
23
|
classNames: "ds-modal__close"
|
|
24
24
|
})}}
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
|
|
26
|
+
{% if params.title %}
|
|
27
|
+
<h2>{{ params.title }}</h2>
|
|
28
|
+
{% endif %}
|
|
29
|
+
|
|
30
|
+
{{ caller() if caller }}
|
|
27
31
|
|
|
28
32
|
{% if params.primaryButton or params.secondaryButton %}
|
|
29
33
|
<div class="ds-modal__buttons">
|
package/package.json
CHANGED