@sb1/ffe-skeleton-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 +41 -11
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,23 +1,53 @@
1
- ## Install
1
+ # @sb1/ffe-skeleton-react
2
+
3
+ ## Beskrivelse
4
+
5
+ Skjelett-komponenter for plassholdere mens innhold laster. Setter `aria-hidden={true}` automatisk. Bruk `aria-busy={true}` på foreldreelementet.
6
+
7
+ ## Installasjon
2
8
 
3
9
  ```bash
4
10
  npm install --save @sb1/ffe-skeleton-react
5
11
  ```
6
12
 
7
- ## Usage
13
+ ## Bruk
8
14
 
9
- Full documentation on skeleton usage is available at https://design.sparebank1.no/komponenter/skeleton/.
15
+ Full dokumentasjon: https://sparebank1.github.io/designsystem/
10
16
 
11
- ## Development
17
+ ### Tilgjengelige komponenter
12
18
 
13
- To start a local development server, run the following from the designsystem root folder:
19
+ ```tsx
20
+ import { Skeleton, SkeletonCircle } from '@sb1/ffe-skeleton-react';
21
+ ```
14
22
 
15
- ```bash
16
- npm install
17
- npm run build
18
- npm start
23
+ ## Eksempler
24
+
25
+ ### Tekst-plassholder
26
+
27
+ ```tsx
28
+ <div aria-busy={true}>
29
+ <Skeleton width="60%" height="24px" />
30
+ <Skeleton width="100%" height="16px" />
31
+ <Skeleton width="80%" height="16px" />
32
+ </div>
19
33
  ```
20
34
 
21
- A local instance of `Storybook` with live reloading will run at http://localhost:6006/.
35
+ ### Sirkulær plassholder
36
+
37
+ ```tsx
38
+ <div
39
+ style={{ display: 'flex', alignItems: 'center', gap: '16px' }}
40
+ aria-busy={true}
41
+ >
42
+ <SkeletonCircle size="lg" />
43
+ <Skeleton width="150px" height="20px" />
44
+ </div>
45
+ ```
46
+
47
+ ## Utvikling
48
+
49
+ ```bash
50
+ npm install && npm run build && npm start
51
+ ```
22
52
 
23
- Example implementations using the latest versions of all components are also available at https://sparebank1.github.io/designsystem.
53
+ Storybook kjører på http://localhost:6006/.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sb1/ffe-skeleton-react",
3
- "version": "100.8.2",
3
+ "version": "100.9.0",
4
4
  "description": "React implementation of ffe-skeleton loading",
5
5
  "keywords": [
6
6
  "ffe",
@@ -30,8 +30,8 @@
30
30
  "test:watch": "ffe-buildtool jest --watch"
31
31
  },
32
32
  "dependencies": {
33
- "@sb1/ffe-core": "^100.8.2",
34
- "@sb1/ffe-skeleton": "^100.8.2",
33
+ "@sb1/ffe-core": "^100.9.0",
34
+ "@sb1/ffe-skeleton": "^100.9.0",
35
35
  "classnames": "^2.5.1"
36
36
  },
37
37
  "peerDependencies": {
@@ -40,5 +40,5 @@
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
- "gitHead": "50fbbbdb2023a60add7158e8c5bd6443c4f9c95e"
43
+ "gitHead": "41f20cf10bec5ebe53036c282690983d2114fb45"
44
44
  }