@sb1/ffe-tags-react 100.8.2 → 100.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.
Files changed (2) hide show
  1. package/README.md +77 -0
  2. package/package.json +5 -5
package/README.md ADDED
@@ -0,0 +1,77 @@
1
+ # @sb1/ffe-tags-react
2
+
3
+ ## Beskrivelse
4
+
5
+ Tag-komponenten brukes for merking og kategorisering av innhold.
6
+
7
+ ## Installasjon
8
+
9
+ ```bash
10
+ npm install --save @sb1/ffe-tags-react
11
+ ```
12
+
13
+ ## Bruk
14
+
15
+ Full dokumentasjon: https://sparebank1.github.io/designsystem/
16
+
17
+ ### Grunnleggende eksempel
18
+
19
+ ```tsx
20
+ import { Tag } from '@sb1/ffe-tags-react';
21
+
22
+ <Tag variant="info">Info</Tag>
23
+ <Tag variant="success">Suksess</Tag>
24
+ <Tag variant="warning">Advarsel</Tag>
25
+ <Tag variant="critical">Kritisk</Tag>
26
+ <Tag variant="neutral">Nøytral</Tag>
27
+ <Tag variant="tip">Tips</Tag>
28
+ ```
29
+
30
+ ### Ulike typer
31
+
32
+ ```tsx
33
+ <Tag type="emphasis" variant="info">Fremhevet</Tag>
34
+ <Tag type="subtle" variant="info">Subtil</Tag>
35
+ ```
36
+
37
+ ### Ulike størrelser
38
+
39
+ ```tsx
40
+ <Tag size="sm">Liten</Tag>
41
+ <Tag size="md">Medium</Tag>
42
+ <Tag size="lg">Stor</Tag>
43
+ ```
44
+
45
+ ### Med ikon
46
+
47
+ ```tsx
48
+ import { Tag } from '@sb1/ffe-tags-react';
49
+ import { Icon } from '@sb1/ffe-icons-react';
50
+
51
+ <Tag variant="critical">
52
+ <Icon fileUrl={warningIconUrl} size="sm" />
53
+ Ikke betalt
54
+ </Tag>;
55
+ ```
56
+
57
+ ### Importere CSS
58
+
59
+ ```css
60
+ @import '@sb1/ffe-tags/css/tag.css';
61
+ ```
62
+
63
+ ### TypeScript
64
+
65
+ ```tsx
66
+ import { Tag, type TagProps } from '@sb1/ffe-tags-react';
67
+ ```
68
+
69
+ ## Utvikling
70
+
71
+ Fra designsystem-rotmappen:
72
+
73
+ ```bash
74
+ npm install && npm run build && npm start
75
+ ```
76
+
77
+ Storybook kjører på http://localhost:6006/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sb1/ffe-tags-react",
3
- "version": "100.8.2",
3
+ "version": "100.9.0",
4
4
  "description": "React implementation of ffe-tags component",
5
5
  "keywords": [
6
6
  "ffe",
@@ -32,9 +32,9 @@
32
32
  "test:watch": "ffe-buildtool jest --watch"
33
33
  },
34
34
  "dependencies": {
35
- "@sb1/ffe-core": "^100.8.2",
36
- "@sb1/ffe-icons-react": "^100.8.2",
37
- "@sb1/ffe-tags": "^100.8.2",
35
+ "@sb1/ffe-core": "^100.9.0",
36
+ "@sb1/ffe-icons-react": "^100.9.0",
37
+ "@sb1/ffe-tags": "^100.9.0",
38
38
  "classnames": "^2.5.1"
39
39
  },
40
40
  "peerDependencies": {
@@ -43,5 +43,5 @@
43
43
  "publishConfig": {
44
44
  "access": "public"
45
45
  },
46
- "gitHead": "50fbbbdb2023a60add7158e8c5bd6443c4f9c95e"
46
+ "gitHead": "41f20cf10bec5ebe53036c282690983d2114fb45"
47
47
  }