@norges-domstoler/dds-components 22.8.2 → 22.9.0
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/README.md +17 -18
- package/dist/index.css +6 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +35 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +35 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -20,32 +20,31 @@ Importer styling av komponentene i CSS:
|
|
|
20
20
|
|
|
21
21
|
## 🔨 Bruk
|
|
22
22
|
|
|
23
|
-
Wrapp applikasjonen din i `<
|
|
23
|
+
Wrapp applikasjonen din i `<DdsProvider>`.
|
|
24
24
|
|
|
25
|
-
```
|
|
26
|
-
import
|
|
27
|
-
import
|
|
25
|
+
```jsx
|
|
26
|
+
import React from 'react';
|
|
27
|
+
import ReactDOM from 'react-dom/client';
|
|
28
28
|
import {
|
|
29
29
|
Button,
|
|
30
30
|
TextInput,
|
|
31
|
-
|
|
31
|
+
DdsProvider,
|
|
32
32
|
} from '@norges-domstoler/dds-components';
|
|
33
33
|
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
const root = ReactDOM.createRoot(document.getElementById('root'));
|
|
35
|
+
root.render(
|
|
36
|
+
<React>
|
|
37
|
+
<DdsProvider language="nb">
|
|
38
|
+
<TextInput label="Input" />
|
|
39
|
+
<Button>Primary</Button>
|
|
40
|
+
<Button purpose="secondary" size="small">
|
|
41
|
+
Secondary
|
|
42
|
+
</Button>
|
|
43
|
+
</DdsProvider>
|
|
44
|
+
</React>,
|
|
42
45
|
);
|
|
43
|
-
|
|
44
|
-
const root = createRoot(document.getElementById('root'));
|
|
45
|
-
|
|
46
|
-
root.render(<App />);
|
|
47
46
|
```
|
|
48
47
|
|
|
49
48
|
## 📃 Komponenter
|
|
50
49
|
|
|
51
|
-
Sjekk [Komponenter](https://design.domstol.no/987b33f71/p/438035-komponenter) for oversikt over alle komponenter, og [
|
|
50
|
+
Sjekk [Komponenter](https://design.domstol.no/987b33f71/p/438035-komponenter) for oversikt over alle komponenter, og [Nyheter](https://design.domstol.no/987b33f71/p/66ec5c-nyheter) for status på nye komponenter.
|
package/dist/index.css
CHANGED
|
@@ -335,6 +335,9 @@
|
|
|
335
335
|
margin-bottom: var(--dds-font-heading-xxlarge-paragraph-spacing);
|
|
336
336
|
padding-top: var(--dds-spacing-padding-top-heading);
|
|
337
337
|
}
|
|
338
|
+
:where(.typographyStyles_heading--margins-over-input) {
|
|
339
|
+
margin-bottom: var(--dds-spacing-x1-5);
|
|
340
|
+
}
|
|
338
341
|
:where(.typographyStyles_label-medium) {
|
|
339
342
|
margin: 0;
|
|
340
343
|
font: var(--dds-font-label-medium);
|
|
@@ -348,6 +351,9 @@
|
|
|
348
351
|
:where(.typographyStyles_legend) {
|
|
349
352
|
padding-inline: 0;
|
|
350
353
|
}
|
|
354
|
+
:where(.typographyStyles_legend--margins-over-input) {
|
|
355
|
+
margin-bottom: var(--dds-spacing-x1-5);
|
|
356
|
+
}
|
|
351
357
|
:where(.typographyStyles_caption) {
|
|
352
358
|
text-align: left;
|
|
353
359
|
}
|