@sb1/ffe-spinner-react 100.8.3 → 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 +45 -8
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,18 +1,57 @@
1
1
  # @sb1/ffe-spinner-react
2
2
 
3
- ## Install
3
+ ## Beskrivelse
4
+
5
+ Lasteindikator for pågående prosesser.
6
+
7
+ ## Installasjon
4
8
 
5
9
  ```bash
6
10
  npm install --save @sb1/ffe-spinner-react
7
11
  ```
8
12
 
9
- ## Usage
13
+ ## Bruk
14
+
15
+ Full dokumentasjon: https://sparebank1.github.io/designsystem/
10
16
 
11
- Full documentation on spinner usage is available at https://design.sparebank1.no/komponenter/spinners/.
17
+ ### Importering
18
+
19
+ ```tsx
20
+ import { Spinner } from '@sb1/ffe-spinner-react';
21
+ import type { SpinnerProps } from '@sb1/ffe-spinner-react';
22
+ ```
12
23
 
13
- ## Development
24
+ ## Eksempler
14
25
 
15
- To start a local development server, run the following from the designsystem root folder:
26
+ ### Grunnleggende bruk
27
+
28
+ ```tsx
29
+ <Spinner />
30
+ <Spinner large={true} />
31
+ <Spinner immediate={true} />
32
+ ```
33
+
34
+ ### Med tekst
35
+
36
+ ```tsx
37
+ <Spinner loadingText="Laster inn data..." />
38
+ ```
39
+
40
+ ### Betinget visning basert på lasting
41
+
42
+ ```tsx
43
+ function DataLoader() {
44
+ const [isLoading, setIsLoading] = useState(true);
45
+
46
+ if (isLoading) {
47
+ return <Spinner loadingText="Henter data..." />;
48
+ }
49
+
50
+ return <div>{/* Vis data her */}</div>;
51
+ }
52
+ ```
53
+
54
+ ## Utvikling
16
55
 
17
56
  ```bash
18
57
  npm install
@@ -20,6 +59,4 @@ npm run build
20
59
  npm start
21
60
  ```
22
61
 
23
- A local instance of `Storybook` with live reloading will run at http://localhost:6006/.
24
-
25
- Example implementations using the latest versions of all components are also available at https://sparebank1.github.io/designsystem.
62
+ Lokal Storybook kjører http://localhost:6006/.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sb1/ffe-spinner-react",
3
- "version": "100.8.3",
3
+ "version": "100.9.0",
4
4
  "license": "MIT",
5
5
  "author": "SpareBank 1",
6
6
  "files": [
@@ -24,11 +24,11 @@
24
24
  "test:watch": "ffe-buildtool jest --watch"
25
25
  },
26
26
  "dependencies": {
27
- "@sb1/ffe-spinner": "^100.8.3",
27
+ "@sb1/ffe-spinner": "^100.9.0",
28
28
  "classnames": "^2.5.1"
29
29
  },
30
30
  "devDependencies": {
31
- "@sb1/ffe-buildtool": "^100.8.3",
31
+ "@sb1/ffe-buildtool": "^100.9.0",
32
32
  "react": "^18.2.0",
33
33
  "react-dom": "^18.2.0"
34
34
  },
@@ -38,5 +38,5 @@
38
38
  "publishConfig": {
39
39
  "access": "public"
40
40
  },
41
- "gitHead": "f33cf64a467cb430540d1320e763a4f223a8012c"
41
+ "gitHead": "41f20cf10bec5ebe53036c282690983d2114fb45"
42
42
  }